{"id":13396054,"url":"https://github.com/umano/AndroidSlidingUpPanel","last_synced_at":"2025-03-13T22:31:37.464Z","repository":{"id":8735540,"uuid":"10410764","full_name":"umano/AndroidSlidingUpPanel","owner":"umano","description":"This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.","archived":false,"fork":false,"pushed_at":"2022-07-21T00:21:03.000Z","size":2861,"stargazers_count":9495,"open_issues_count":301,"forks_count":2268,"subscribers_count":351,"default_branch":"master","last_synced_at":"2024-05-29T03:28:23.849Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://umano.me","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-31T18:33:53.000Z","updated_at":"2024-05-23T04:31:45.000Z","dependencies_parsed_at":"2022-08-07T04:16:44.325Z","dependency_job_id":null,"html_url":"https://github.com/umano/AndroidSlidingUpPanel","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umano%2FAndroidSlidingUpPanel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umano%2FAndroidSlidingUpPanel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umano%2FAndroidSlidingUpPanel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umano%2FAndroidSlidingUpPanel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umano","download_url":"https://codeload.github.com/umano/AndroidSlidingUpPanel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243493766,"owners_count":20299714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T18:00:38.536Z","updated_at":"2025-03-13T22:31:37.102Z","avatar_url":"https://github.com/umano.png","language":"Java","readme":"[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.sothree.slidinguppanel/library/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.sothree.slidinguppanel/library)\n[![Badge](http://www.libtastic.com/static/osbadges/30.png)](http://www.libtastic.com/technology/30/)\n\n**Note:** we are **not** actively responding to issues right now. If you find a bug, please submit a PR. \n\nAndroid Sliding Up Panel\n=========================\n\nThis library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application.\n\nAs seen in Umano Android App (now acquired by Dropbox):\n\n![SlidingUpPanelLayout](https://raw.github.com/umano/AndroidSlidingUpPanelDemo/master/slidinguppanel.png)\n\n### Known Uses in Popular Apps\n\n* [Soundcloud] (https://play.google.com/store/apps/details?id=com.soundcloud.android)\n* [Dropbox Paper] (https://play.google.com/store/apps/details?id=com.dropbox.paper)\n* [Snaptee] (https://play.google.com/store/apps/details?id=co.snaptee.android)\n\nIf you are using the library and you would like to have your app listed, simply let us know.\n\n### Importing the Library\n\nSimply add the following dependency to your `build.gradle` file to use the latest version:\n\n```groovy\ndependencies {\n    repositories {\n        mavenCentral()\n    }\n    compile 'com.sothree.slidinguppanel:library:3.4.0'\n}\n```\n\n### Usage\n\n* Include `com.sothree.slidinguppanel.SlidingUpPanelLayout` as the root element in your activity layout.\n* The layout must have `gravity` set to either `top` or `bottom`.\n* Make sure that it has two children. The first child is your main layout. The second child is your layout for the sliding up panel.\n* The main layout should have the width and the height set to `match_parent`.\n* The sliding layout should have the width set to `match_parent` and the height set to either `match_parent`, `wrap_content` or the max desireable height. If you would like to define the height as the percetange of the screen, set it to `match_parent` and also define a `layout_weight` attribute for the sliding view.\n* By default, the whole panel will act as a drag region and will intercept clicks and drag events. You can restrict the drag area to a specific view by using the `setDragView` method or `umanoDragView` attribute.\n\nFor more information, please refer to the sample code.\n\n```xml\n\u003ccom.sothree.slidinguppanel.SlidingUpPanelLayout\n    xmlns:sothree=\"http://schemas.android.com/apk/res-auto\"\n    android:id=\"@+id/sliding_layout\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:gravity=\"bottom\"\n    sothree:umanoPanelHeight=\"68dp\"\n    sothree:umanoShadowHeight=\"4dp\"\u003e\n\n    \u003cTextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:gravity=\"center\"\n        android:text=\"Main Content\"\n        android:textSize=\"16sp\" /\u003e\n\n    \u003cTextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:gravity=\"center|top\"\n        android:text=\"The Awesome Sliding Up Panel\"\n        android:textSize=\"16sp\" /\u003e\n\u003c/com.sothree.slidinguppanel.SlidingUpPanelLayout\u003e\n```\nFor smooth interaction with the ActionBar, make sure that `windowActionBarOverlay` is set to `true` in your styles:\n```xml\n\u003cstyle name=\"AppTheme\"\u003e\n    \u003citem name=\"android:windowActionBarOverlay\"\u003etrue\u003c/item\u003e\n\u003c/style\u003e\n```\nHowever, in this case you would likely want to add a top margin to your main layout of `?android:attr/actionBarSize`\nor `?attr/actionBarSize` to support older API versions.\n\n### Caveats, Additional Features and Customization\n\n* If you are using a custom `umanoDragView`, the panel will pass through the click events to the main layout. Make your second layout `clickable` to prevent this.\n* You can change the panel height by using the `setPanelHeight` method or `umanoPanelHeight` attribute.\n* If you would like to hide the shadow above the sliding panel, set `shadowHeight` attribute to 0.\n* Use `setEnabled(false)` to completely disable the sliding panel (including touch and programmatic sliding)\n* Use `setTouchEnabled(false)` to disables panel's touch responsiveness (drag and click), you can still control the panel programatically\n* Use `getPanelState` to get the current panel state\n* Use `setPanelState` to set the current panel state\n* You can add parallax to the main view by setting `umanoParallaxOffset` attribute (see demo for the example).\n* You can set a anchor point in the middle of the screen using `setAnchorPoint` to allow an intermediate expanded state for the panel (similar to Google Maps).\n* You can set a `PanelSlideListener` to monitor events about sliding panes.\n* You can also make the panel slide from the top by changing the `layout_gravity` attribute of the layout to `top`.\n* You can provide a scroll interpolator for the panel movement by setting `umanoScrollInterpolator` attribute. For instance, if you want a bounce or overshoot effect for the panel.\n* By default, the panel pushes up the main content. You can make it overlay the main content by using `setOverlayed` method or `umanoOverlay` attribute. This is useful if you would like to make the sliding layout semi-transparent. You can also set `umanoClipPanel` to false to make the panel transparent in non-overlay mode.\n* By default, the main content is dimmed as the panel slides up. You can change the dim color by changing `umanoFadeColor`. Set it to `\"@android:color/transparent\"` to remove dimming completely.\n\n### Scrollable Sliding Views\n\nIf you have a scrollable view inside of the sliding panel, make sure to set `umanoScrollableView` attribute on the panel to supported nested scrolling. The panel supports `ListView`, `ScrollView` and `RecyclerView` out of the box, but you can add support for any type of a scrollable view by setting a custom `ScrollableViewHelper`. Here is an example for `NestedScrollView`\n\n```\npublic class NestedScrollableViewHelper extends ScrollableViewHelper {\n  public int getScrollableViewScrollPosition(View scrollableView, boolean isSlidingUp) {\n    if (mScrollableView instanceof NestedScrollView) {\n      if(isSlidingUp){\n        return mScrollableView.getScrollY();\n      } else {\n        NestedScrollView nsv = ((NestedScrollView) mScrollableView);\n        View child = nsv.getChildAt(0);\n        return (child.getBottom() - (nsv.getHeight() + nsv.getScrollY()));\n      }\n    } else {\n      return 0;\n    }\n  }\n}\n```\n\nOnce you define your helper, you can set it using `setScrollableViewHelper` on the sliding panel.\n\n### Implementation\n\nThis library was initially based on the opened-sourced [SlidingPaneLayout](http://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.html) component from the r13 of the Android Support Library. Thanks Android team!\n\n### Requirements\n\nTested on Android 2.2+\n\n### Other Contributors\n\n* Nov 23, 15 - [@kiyeonk](https://github.com/kiyeonk) - umanoScrollInterpolator support\n* Jan 21, 14 - ChaYoung You ([@yous](https://github.com/yous)) - Slide from the top support\n* Aug 20, 13 - [@gipi](https://github.com/gipi) - Android Studio Support\n* Jul 24, 13 - Philip Schiffer ([@hameno](https://github.com/hameno)) - Maven Support\n* Oct 20, 13 - Irina Preșa ([@iriina](https://github.com/iriina)) - Anchor Support\n* Dec 1, 13 - ([@youchy](https://github.com/youchy)) - XML Attributes Support\n* Dec 22, 13 - Vladimir Mironov ([@MironovNsk](https://github.com/nsk-mironov)) - Custom Expanded Panel Height\n\nIf you have an awesome pull request, send it over!\n\n### Changelog\n\n* 3.4.0\n  * Use the latest support library 26 and update the min version to 14.\n  * Bug fixes\n* 3.3.1\n  * Lots of bug fixes from various pull requests.\n  * Removed the nineoldandroids dependency. Use ViewCompat instead.\n* 3.3.0\n  * You can now set a `FadeOnClickListener`, for when the faded area of the main content is clicked.\n  * `PanelSlideListener` has a new format (multiple of them can be set now\n  * Fixed the setTouchEnabled bug\n* 3.2.1\n  * Add support for `umanoScrollInterpolator`\n  * Add support for percentage-based sliding panel height using `layout_weight` attribute\n  * Add `ScrollableViewHelper` to allow users extend support for new types of scrollable views.\n* 3.2.0\n  * Rename `umanoParalaxOffset` to `umanoParallaxOffset`\n  * RecyclerView support.\n* 3.1.0\n  * Added `umanoScrollableView` to supported nested scrolling in children (only ScrollView and ListView are supported for now)\n* 3.0.0\n  * Added `umano` prefix for all attributes\n  * Added `clipPanel` attribute for supporting transparent panels in non-overlay mode.\n  * `setEnabled(false)` - now completely disables the sliding panel (touch and programmatic sliding)\n  * `setTouchEnabled(false)` - disables panel's touch responsiveness (drag and click), you can still control the panel programatically\n  * `getPanelState` - is now the only method to get the current panel state\n  * `setPanelState` - is now the only method to modify the panel state from code\n* 2.0.2 - Allow `wrap_content` for sliding view height attribute. Bug fixes. \n* 2.0.1 - Bug fixes. \n* 2.0.0 - Cleaned up various public method calls. Added animated `showPanel`/`hidePanel` methods. \n* 1.0.1 - Initial Release \n\n### Licence\n\n\u003e Licensed under the Apache License, Version 2.0 (the \"License\");\n\u003e you may not use this work except in compliance with the License.\n\u003e You may obtain a copy of the License in the LICENSE file, or at:\n\u003e\n\u003e  [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\u003e\n\u003e Unless required by applicable law or agreed to in writing, software\n\u003e distributed under the License is distributed on an \"AS IS\" BASIS,\n\u003e WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\u003e See the License for the specific language governing permissions and\n\u003e limitations under the License.\n","funding_links":[],"categories":["Index `(light-weight pages)`","Java","Sliding","Index","Uncategorized","Libs"],"sub_categories":["Uncategorized","\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumano%2FAndroidSlidingUpPanel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumano%2FAndroidSlidingUpPanel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumano%2FAndroidSlidingUpPanel/lists"}