diff --git a/app/src/main/java/io/legado/app/ui/widget/page/ContentView.kt b/app/src/main/java/io/legado/app/ui/widget/page/ContentView.kt index bf96fb382..121280b9e 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/ContentView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/ContentView.kt @@ -5,7 +5,6 @@ import android.content.Context import android.graphics.Typeface import android.graphics.drawable.Drawable import android.util.AttributeSet -import android.view.MotionEvent import android.widget.FrameLayout import android.widget.ImageView import androidx.appcompat.widget.AppCompatImageView @@ -80,10 +79,6 @@ class ContentView : FrameLayout { } } - fun textViewTouch(event: MotionEvent) { - content_text_view.onTouchEvent(event) - } - fun setBg(bg: Drawable?) { //all supported ImageLoader.load(context, bg) diff --git a/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt b/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt index 819b57ab3..448d7d2d4 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt @@ -114,7 +114,7 @@ class PageView(context: Context, attrs: AttributeSet) : FrameLayout(context, att @SuppressLint("ClickableViewAccessibility") override fun onTouchEvent(event: MotionEvent): Boolean { - curPage?.textViewTouch(event) + curPage?.dispatchTouchEvent(event) return pageDelegate?.onTouch(event) ?: super.onTouchEvent(event) }