# ToggleExpandLayout
**Repository Path**: krguang/ToggleExpandLayout
## Basic Information
- **Project Name**: ToggleExpandLayout
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-03-12
- **Last Updated**: 2021-03-12
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## 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)