pull/34/head
kunfei 5 years ago
parent 76478bc1b8
commit 7cd7b39ad8
  1. 5
      app/src/main/java/io/legado/app/ui/widget/page/ContentView.kt
  2. 1
      app/src/main/java/io/legado/app/ui/widget/page/PageView.kt

@ -5,6 +5,7 @@ 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
@ -79,6 +80,10 @@ class ContentView : FrameLayout {
}
}
fun textViewTouch(event: MotionEvent) {
content_text_view.onTouchEvent(event)
}
fun setBg(bg: Drawable?) {
//all supported
ImageLoader.load(context, bg)

@ -114,6 +114,7 @@ class PageView(context: Context, attrs: AttributeSet) : FrameLayout(context, att
@SuppressLint("ClickableViewAccessibility")
override fun onTouchEvent(event: MotionEvent): Boolean {
curPage?.textViewTouch(event)
return pageDelegate?.onTouch(event) ?: super.onTouchEvent(event)
}

Loading…
Cancel
Save