An open API service indexing awesome lists of open source software.

https://github.com/mfori/swipetohidelayout

Simple android library for hiding views by dragging them out
https://github.com/mfori/swipetohidelayout

android animation drag draggable hide-show layout swipe view

Last synced: 8 months ago
JSON representation

Simple android library for hiding views by dragging them out

Awesome Lists containing this project

README

          

# SwipeToHideLayout

Simple android lib for hiding out views by draging them out of screen in the set direction.

Also provides methods for hiding and showing them manually.



### Importing the library
Simply add the following dependency to your build.gradle file:
```
compile 'cz.martinforejt:swipetohidelayout:1.0.4'
```
### Usage
Work with SwipeToHideLayout like with android FrameLayout.

Direction must be set (xml or ```setDirection(int)```) or exception will be thrown!
The layout must be aligned to side that is defined by direction. The width/height can not be ```MATCH_PARENT``` in sliding direction.
```

```

```
final SwipeToHideLayout top = findViewById(R.id.layout_top);
top.setOnSwipeChangeListener(new OnSwipeChangeListener() {
@Override
public void onSwipeChange(boolean visible, SwipeHideable swipeHideable) {
// catch swipe
}
});
```
### XML attributes
```
direction - drag direction (left, top, right, bottom)
enabled - is dragging enabled (true, false)
```
### Methods
public methods from
SwipeHideable.java
### Javadoc
https://mfori.github.io/SwipeToHideLayout/