mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-31 23:03:54 +01:00
change the overridden method signature as per API 34
This commit is contained in:
parent
096c075548
commit
ba573edfcd
1 changed files with 3 additions and 3 deletions
|
|
@ -40,14 +40,14 @@ open class OnSwipeTouchListener(context: Context?) : View.OnTouchListener {
|
|||
* Detects the gestures
|
||||
*/
|
||||
override fun onFling(
|
||||
event1: MotionEvent,
|
||||
event1: MotionEvent?,
|
||||
event2: MotionEvent,
|
||||
velocityX: Float,
|
||||
velocityY: Float
|
||||
): Boolean {
|
||||
try {
|
||||
val diffY: Float = event2.y - event1.y
|
||||
val diffX: Float = event2.x - event1.x
|
||||
val diffY: Float = event2.y - (event1?.y ?: event2.y)
|
||||
val diffX: Float = event2.x - (event1?.x ?: event2.x)
|
||||
if (abs(diffX) > abs(diffY)) {
|
||||
if (abs(diffX) > SWIPE_THRESHOLD_WIDTH && abs(velocityX) >
|
||||
SWIPE_VELOCITY_THRESHOLD) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue