https://github.com/fenjuly/ToggleExpandLayout
A togglelayout that can be used in setting interface
https://github.com/fenjuly/ToggleExpandLayout
Last synced: 8 months ago
JSON representation
A togglelayout that can be used in setting interface
- Host: GitHub
- URL: https://github.com/fenjuly/ToggleExpandLayout
- Owner: fenjuly
- License: mit
- Created: 2015-08-30T09:37:43.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-05-04T21:20:54.000Z (over 7 years ago)
- Last Synced: 2024-07-31T18:16:26.915Z (over 1 year ago)
- Language: Java
- Size: 85 KB
- Stars: 883
- Watchers: 24
- Forks: 144
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- -awesome-android-ui - ToggleExpandLayout
- awesome-android-ui - ToggleExpandLayout
- awesome-android-ui - ToggleExpandLayout
- fucking-awesome-android-ui - ToggleExpandLayout
- fucking-awesome-android-ui - ToggleExpandLayout
README
# ToggleExpandLayout
[](http://android-arsenal.com/details/1/2412)
A togglelayout that can be used in setting interface.
Originally designed by [dribbble](https://dribbble.com/shots/2211566-Android-Toggle-Behaviour).
And the author said that's why he designed this:
>I never liked how some settings are disabled by default and not tappable until another settings has been turned on/off.
>My concept is to hide these disabled settings behind their "master toggle" and then have them transition out as they become active - making the list cleaner, with less clutter and ultimately easier to use.
### Preview

### Usage
* **XML**
if yout just use one togglelayout:
```xml
```
if yout want to use more than one togglelayouts with drop and rise animation, use DropDownLayout:
```xml
...
...
```
* **JAVA**
two methods `public void open()` and `public void close()`
```java
layout.setOnToggleTouchListener(new ToggleExpandLayout.OnToggleTouchListener() {
@Override
public void onStartOpen() {
}
@Override
public void onOpen() {
}
@Override
public void onStartClose() {
}
@Override
public void onClosed() {
}
});
```
###Get into your build
```gradle
repositories {
maven {
url "https://jitpack.io"
}
}
dependencies {
compile 'com.github.fenjuly:ToggleExpandLayout:774e497692'
}
```
###License
[MIT](https://github.com/fenjuly/ToggleExpandLayout/raw/master/LICENSE)