mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
use the commons viewpager
This commit is contained in:
parent
69528cfa01
commit
1b4e98eb08
2 changed files with 1 additions and 37 deletions
|
@ -1,36 +0,0 @@
|
||||||
package com.simplemobiletools.gallery.views
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.util.AttributeSet
|
|
||||||
import android.view.MotionEvent
|
|
||||||
|
|
||||||
import com.booking.rtlviewpager.RtlViewPager
|
|
||||||
|
|
||||||
class MyViewPager : RtlViewPager {
|
|
||||||
|
|
||||||
constructor(context: Context) : super(context) {
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onInterceptTouchEvent(ev: MotionEvent): Boolean {
|
|
||||||
try {
|
|
||||||
return super.onInterceptTouchEvent(ev)
|
|
||||||
} catch (ex: IllegalArgumentException) {
|
|
||||||
ex.printStackTrace()
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onTouchEvent(ev: MotionEvent): Boolean {
|
|
||||||
try {
|
|
||||||
return super.onTouchEvent(ev)
|
|
||||||
} catch (ex: IllegalArgumentException) {
|
|
||||||
ex.printStackTrace()
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -5,7 +5,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.simplemobiletools.gallery.views.MyViewPager
|
<com.simplemobiletools.commons.views.MyViewPager
|
||||||
android:id="@+id/view_pager"
|
android:id="@+id/view_pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="match_parent"/>
|
||||||
|
|
Loading…
Reference in a new issue