Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/elevenetc/DraggableView
- Owner: elevenetc
- Created: 2015-09-08T00:34:55.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-09T23:19:00.000Z (about 9 years ago)
- Last Synced: 2023-10-20T19:39:21.403Z (about 1 year ago)
- Topics: android, android-library, android-ui, animation
- Language: Java
- Homepage:
- Size: 43 MB
- Stars: 560
- Watchers: 19
- Forks: 82
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-android-ui - https://github.com/elevenetc/DraggableView
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