Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/elevenetc/DraggableView

Draggable views with rotation and skew/scale effects
https://github.com/elevenetc/DraggableView

android android-library android-ui animation

Last synced: about 3 hours ago
JSON representation

Draggable views with rotation and skew/scale effects

Awesome Lists containing this project

README

        

# DraggableView
Draggable views with rotation and skew/scale effects.

![animation](docs/skewview.gif)
![animation](docs/rotateview.gif)

### Usage
1. Implement [`DragController.IDragViewGroup`](library/src/main/java/su/levenetc/android/draggableview/DragController.java)
2. Create instance of [`DragController`](library/src/main/java/su/levenetc/android/draggableview/DragController.java)
3. Override `onTouchEvent` of your `ViewGroup` and call `DragController#onTouchEvent`:
```Java
@Override public boolean onTouchEvent(MotionEvent event) {
return dragController.onTouchEvent(event);
}
```
See full sample at [`SampleGridContainer`](sample/src/main/java/su/levenetc/android/sample/SampleGridContainer.java)
### Animation adjustments
[`SkewView`](library/src/main/java/su/levenetc/android/draggableview/SkewView.java) and [`RotateView`](library/src/main/java/su/levenetc/android/draggableview/RotateView.java) containe multipliers which change rotation, skew and scale values.
### Download
```Groovy
repositories {
maven { url "https://jitpack.io" }
}
//...
dependencies {
//...
compile 'com.github.elevenetc:draggableview:v1.0.1'
}
```
### Licence
http://www.apache.org/licenses/LICENSE-2.0