项目作者: debmalya

项目描述 :
To create an android widget so that it will swipe in both way . Swipe right to accept ( CONFIRM ). Swipe left to reject ( REJECT ).
高级语言: Kotlin
项目地址: git://github.com/debmalya/BothWaySwipeButton.git
创建时间: 2019-09-28T05:17:24Z
项目社区:https://github.com/debmalya/BothWaySwipeButton

开源协议:MIT License

下载


BothWaySwipeButton

To create an android widget so that it will swipe to mark CONFIRMATION to prevent accidental button press.
Right swipe to accept ( CONFIRM ). Swipe left to reject ( REJECT ).

Behaviour

Initial Screen
Right Swipe
Left Swipe

How to use it.

  1. <org.deb.widget.controller.SwipeButtonController
  2. android:id="@+id/sb_swipe"
  3. android:layout_width="match_parent"
  4. android:layout_height="wrap_content"
  5. android:layout_alignParentStart="true"
  6. android:layout_alignParentLeft="true"
  7. android:layout_centerVertical="true"
  8. android:layout_marginTop="100dp"
  9. android:layout_marginBottom="298dp"
  10. android:clickable="false"
  11. android:max="100"
  12. android:maxHeight="35dp"
  13. android:minHeight="35dp"
  14. android:progressDrawable="@android:color/transparent"
  15. android:splitTrack="false"
  16. android:thumb="@drawable/sb_thumb_bg"
  17. android:thumbOffset="20dp"
  18. app:layout_constraintBottom_toTopOf="@+id/textView"
  19. app:layout_constraintEnd_toEndOf="parent"
  20. app:layout_constraintStart_toStartOf="parent"
  21. app:layout_constraintTop_toTopOf="parent"
  22. tools:ignore="UnusedAttribute"
  23. ></org.deb.widget.controller.SwipeButtonController>

Reference

Got the idea form gratusik/AGIKSwipeButton