Releases: hyuwah/DraggableView
Releases · hyuwah/DraggableView
DraggableView 1.0.1
What's Changed
- Add GestureDetector with onLongPress by @ekhiw in #14
- Add support for long click listener via
fun onLongPress(view: View)
on theDraggableListener
interface - target sdk
33
, removejcenter
repo &kotlin-android-extensions
plugin
New Contributors
Full Changelog: 1.0.0...1.0.1
DraggableView 1.0.0
refactor: add DraggableView class - update README - add more specific example - possibly breaking with previous implementation - update dependencies / kotlin version - deprecate DraggableImageView & previous extension method
DraggableView 0.5.0
Add support for overlay draggable view (over other app)
New API
makeOverlayDraggable()
New Listener
OverlayDraggableListener
New Example
- Overlay Draggable View
DraggableView 0.4.1
Changelogs
- Same as 0.4.0
- Minor change : rename
onViewMove
toonPositionChanged
for better description
DraggableView 0.4.0
Changelogs
- Add
DraggableListener
interface, see the README for explanation and usage - Refactor codes
- Add more example
DraggableView 0.3.0
Make extensions function callable in java to apply draggable behaviour to any View on java class via DraggableUtils
class
Usage
Here's some example using Button:
on XML:
<Button
android:id="@+id/tv_test_draggable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="DRAGGABLE BUTTON!" />
on Java class:
Button button = findViewById(R.id.tv_test_draggable);
DraggableUtils.makeDraggable(button, Draggable.STICKY.AXIS_X, true); // default is STICKY.NONE & animated true
// First param is the view
// Second param is the axis:
// - Draggable.STICKY.AXIS_X
// - Draggable.STICKY.AXIS_Y
// - Draggable.STICKY.AXIS_XY
// - Draggable.STICKY.NONE
// Third param is animation toggle
// - true or false
DraggableView 0.2.0
Add kotlin extensions function to apply draggable behaviour to any View
Usage:
View.makeDraggable(stickyAxis: Constants.STICKY, animated: Boolean)
stickyAxis is set to NONE and animated is set to true by default if no parameters are passed
To costumize it, you can use the following:
stickyAxis :
Constants.STICKY.NONE
Constants.STICKY.AXIS_X
Constants.STICKY.AXIS_Y
Constants.STICKY.AXIS_XY
animated : true
or false
DraggableImageView base version
- Fix screen border collision (appbar / navigation button)
- Add example
Test Publish Version
DraggableView extending from ImageView