pull/1222/head
gedoor 3 years ago
parent 62901356c5
commit ad5bfc4b57
  1. 2
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
  2. 4
      app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt
  3. 6
      app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt

@ -7,6 +7,7 @@ import android.content.res.Configuration
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.util.Log
import android.view.*
import android.view.ViewGroup.LayoutParams.WRAP_CONTENT
import androidx.activity.result.contract.ActivityResultContracts
@ -150,6 +151,7 @@ class ReadBookActivity : ReadBookBaseActivity(),
override fun onWindowFocusChanged(hasFocus: Boolean) {
super.onWindowFocusChanged(hasFocus)
Log.d("navigationBarHeight", navigationBarHeight.toString())
upSystemUiVisibility()
}

@ -250,7 +250,7 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
selectStart[2] != charIndex
) {
if (selectToInt(relativePos, lineIndex, charIndex)
< selectToInt(selectEnd)
<= selectToInt(selectEnd)
) {
selectStart[0] = relativePos
selectStart[1] = lineIndex
@ -276,7 +276,7 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
|| selectEnd[2] != charIndex
) {
if (selectToInt(relativePos, lineIndex, charIndex)
> selectToInt(selectStart)
>= selectToInt(selectStart)
) {
selectEnd[0] = relativePos
selectEnd[1] = lineIndex

@ -43,9 +43,9 @@ class ReadView(context: Context, attrs: AttributeSet) :
upContent()
}
var isScroll = false
var prevPage: PageView = PageView(context)
var curPage: PageView = PageView(context)
var nextPage: PageView = PageView(context)
val prevPage by lazy { PageView(context) }
val curPage by lazy { PageView(context) }
val nextPage by lazy { PageView(context) }
val defaultAnimationSpeed = 300
private var pressDown = false
private var isMove = false

Loading…
Cancel
Save