Browse Source

Merge branch 'view-adjustment'

Wayne 5 years ago
parent
commit
172b2fa741

+ 20 - 0
reader/src/main/java/com/kdanmobile/reader/view/NonSwipeableViewPage.kt

@@ -0,0 +1,20 @@
+package com.kdanmobile.reader.view
+
+import android.content.Context
+import android.support.v4.view.ViewPager
+import android.util.AttributeSet
+import android.view.MotionEvent
+
+class NonSwipeableViewPage @JvmOverloads constructor(
+        context: Context,
+        attrs: AttributeSet? = null
+) : ViewPager(context, attrs) {
+
+    override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean {
+        return false
+    }
+
+    override fun onTouchEvent(ev: MotionEvent?): Boolean {
+        return false
+    }
+}

+ 1 - 1
reader/src/main/res/layout/view_media_box_tab_shape.xml

@@ -92,7 +92,7 @@
         app:layout_constraintTop_toBottomOf="@+id/layout_shapeSelect"
         app:layout_constraintBottom_toTopOf="@+id/viewPager" />
 
-    <android.support.v4.view.ViewPager
+    <com.kdanmobile.reader.view.NonSwipeableViewPage
         android:id="@+id/viewPager"
         android:layout_width="match_parent"
         android:layout_height="0dp"

+ 1 - 1
reader/src/main/res/layout/view_media_box_tab_stamp.xml

@@ -34,7 +34,7 @@
         app:layout_constraintTop_toBottomOf="@+id/titleButton_stamp"
         app:layout_constraintBottom_toTopOf="@+id/viewPager" />
 
-    <android.support.v4.view.ViewPager
+    <com.kdanmobile.reader.view.NonSwipeableViewPage
         android:id="@+id/viewPager"
         android:layout_width="match_parent"
         android:layout_height="0dp"