liuguangqiang / SwipeBack

SwipeBack is an android library that can finish a activity by using gesture.
Apache License 2.0
1.74k stars 314 forks source link

how to set the trigger zone? #28

Open chenwulue opened 8 years ago

chenwulue commented 8 years ago

how to set the trigger zone

evrenozturkhurriyet commented 7 years ago

In SwipeBackLayout there is a dragHelper. You might adjust the sensitivity while creating the the helper. 1 is full sensitivity. I find it usefull to use as 0.1f.

    viewDragHelper = ViewDragHelper.create(this, 0.1f, new ViewDragHelperCallBack());
Mrtckr008 commented 4 years ago

In SwipeBackLayout there is a dragHelper. You might adjust the sensitivity while creating the the helper. 1 is full sensitivity. I find it usefull to use as 0.1f.

    viewDragHelper = ViewDragHelper.create(this, 0.1f, new ViewDragHelperCallBack());

Hey Evren, I have issue as like triggering threshold or i cant set sensitivity even i use your code in Kotlin. Your code has been syntax error in Kotlin. How can i set ViewDragHelper sensitivity?