选择文本时优先选词

pull/540/head
gedoor 4 years ago
parent 3e83d50762
commit 3d81ab4e26
  1. 8
      app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt

@ -259,7 +259,11 @@ class PageView(context: Context) : FrameLayout(context) {
} }
fun selectStartMoveIndex(relativePage: Int, lineIndex: Int, charIndex: Int) { fun selectStartMoveIndex(relativePage: Int, lineIndex: Int, charIndex: Int) {
try {
binding.contentTextView.selectStartMoveIndex(relativePage, lineIndex, charIndex) binding.contentTextView.selectStartMoveIndex(relativePage, lineIndex, charIndex)
} catch (e: Exception) {
print("selectStartMoveIndex($relativePage, $lineIndex, $charIndex)")
}
} }
fun selectEndMove(x: Float, y: Float) { fun selectEndMove(x: Float, y: Float) {
@ -267,7 +271,11 @@ class PageView(context: Context) : FrameLayout(context) {
} }
fun selectEndMoveIndex(relativePage: Int, lineIndex: Int, charIndex: Int) { fun selectEndMoveIndex(relativePage: Int, lineIndex: Int, charIndex: Int) {
try {
binding.contentTextView.selectEndMoveIndex(relativePage, lineIndex, charIndex) binding.contentTextView.selectEndMoveIndex(relativePage, lineIndex, charIndex)
} catch (e: Exception) {
print("selectEndMoveIndex($relativePage, $lineIndex, $charIndex)")
}
} }
fun cancelSelect() { fun cancelSelect() {

Loading…
Cancel
Save