Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/unixzii/androidpanelslider
A simple library to make panel collapsable.
https://github.com/unixzii/androidpanelslider
Last synced: 15 days ago
JSON representation
A simple library to make panel collapsable.
- Host: GitHub
- URL: https://github.com/unixzii/androidpanelslider
- Owner: unixzii
- License: mit
- Created: 2016-01-10T11:18:55.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-10T11:54:56.000Z (almost 9 years ago)
- Last Synced: 2023-05-13T23:45:37.997Z (over 1 year ago)
- Language: Java
- Size: 1.6 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PanelSlider
A simple library to make panel collapsable, with animation and more.![](https://raw.githubusercontent.com/unixzii/AndroidPanelSlider/master/image/screenshot.gif)
## Features
* Optimized for ListView and ScrollView
* Smooth and flexible
* Support listener callback
* Super easy to use, easy to import(Only one `.java` file)## Requirements
* Any IDE can work
* Android 2.3+## Installation
Just copy the `PanelSlider.java` file into your project and all done.## Usage
The view is actually a `FrameLayout`, and you can just use it as `FrameLayout`.For example, if you want to collapse a ListView, you can just write these:
```xml
```
And in code, you just need to set an initial height, that's all.
```java
PanelSlider slider = (PanelSlider) findViewById(R.id.panelSlider);
slider.setInitialHeight(500);
```If you like, you can set a listener to listen the change of `progress`:
```java
slider.setOnProgressListener(...);
```> **One thing need to be attention.**
>
> Make a little change in your `ListView`(or `ScrollView`), add an `OnTouchListener` to them or override their `onTouchEvent` method. When the list scrolled to its bound, you should call `PanelSlider#allowInterceptChildTouchEvent()` function. It's better to call `PanelSlider#disallowInterceptChildTouchEvent()` function when `ListView` begin to be touched.Just take a look at the demo for details.
## Contribution
If you have any issues or need help please do not hesitate to create an issue ticket. And if you have something awesome to add to it and welcome to make a pull request. Thanks for supporting.## Contact Me
* Email: [[email protected]](mailto:[email protected])
* Weibo: [@unixzii](http://weibo.com/2834711045/profile)
* Twitter: [@unixzii](https://twitter.com/unixzii)
* Google+: [杨弘宇](https://plus.google.com/u/0/114460726879043684053)