优化
This commit is contained in:
@@ -591,9 +591,9 @@ class ReadBookActivity : BaseReadBookActivity(),
|
|||||||
/**
|
/**
|
||||||
* 按键拦截,显示菜单
|
* 按键拦截,显示菜单
|
||||||
*/
|
*/
|
||||||
override fun dispatchKeyEvent(event: KeyEvent?): Boolean {
|
override fun dispatchKeyEvent(event: KeyEvent): Boolean {
|
||||||
val keyCode = event?.keyCode
|
val keyCode = event.keyCode
|
||||||
val action = event?.action
|
val action = event.action
|
||||||
val isDown = action == 0
|
val isDown = action == 0
|
||||||
|
|
||||||
if (keyCode == KeyEvent.KEYCODE_MENU) {
|
if (keyCode == KeyEvent.KEYCODE_MENU) {
|
||||||
|
|||||||
@@ -28,8 +28,7 @@ import androidx.recyclerview.widget.RecyclerView.OnItemTouchListener
|
|||||||
import io.legado.app.BuildConfig
|
import io.legado.app.BuildConfig
|
||||||
import io.legado.app.ui.widget.recycler.DragSelectTouchHelper.AdvanceCallback.Mode
|
import io.legado.app.ui.widget.recycler.DragSelectTouchHelper.AdvanceCallback.Mode
|
||||||
import io.legado.app.utils.DebugLog
|
import io.legado.app.utils.DebugLog
|
||||||
|
import java.util.Locale
|
||||||
import java.util.*
|
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
|
|
||||||
@@ -52,7 +51,7 @@ import kotlin.math.min
|
|||||||
* | | ----------------------------------------------> | |
|
* | | ----------------------------------------------> | |
|
||||||
* +-------------------+ +-----------------------+
|
* +-------------------+ +-----------------------+
|
||||||
*/
|
*/
|
||||||
@Suppress("unused", "MemberVisibilityCanBePrivate")
|
@Suppress("unused", "MemberVisibilityCanBePrivate", "DEPRECATION")
|
||||||
class DragSelectTouchHelper(
|
class DragSelectTouchHelper(
|
||||||
/**
|
/**
|
||||||
* Developer callback which controls the behavior of DragSelectTouchHelper.
|
* Developer callback which controls the behavior of DragSelectTouchHelper.
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ class FastScroller : LinearLayout {
|
|||||||
visibility = if (enabled) View.VISIBLE else View.INVISIBLE
|
visibility = if (enabled) View.VISIBLE else View.INVISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
@SuppressLint("ClickableViewAccessibility")
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
override fun onTouchEvent(event: MotionEvent): Boolean {
|
override fun onTouchEvent(event: MotionEvent): Boolean {
|
||||||
when (event.action) {
|
when (event.action) {
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ class VerticalSeekBar @JvmOverloads constructor(context: Context, attrs: Attribu
|
|||||||
if (!isInEditMode) {
|
if (!isInEditMode) {
|
||||||
applyTint(context.accentColor)
|
applyTint(context.accentColor)
|
||||||
}
|
}
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
ViewCompat.setLayoutDirection(this, ViewCompat.LAYOUT_DIRECTION_LTR)
|
ViewCompat.setLayoutDirection(this, ViewCompat.LAYOUT_DIRECTION_LTR)
|
||||||
|
|
||||||
if (attrs != null) {
|
if (attrs != null) {
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ class VerticalSeekBarWrapper @JvmOverloads constructor(
|
|||||||
applyViewRotation(width, height)
|
applyViewRotation(width, height)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
private fun applyViewRotation(w: Int, h: Int) {
|
private fun applyViewRotation(w: Int, h: Int) {
|
||||||
val seekBar = childSeekBar
|
val seekBar = childSeekBar
|
||||||
|
|
||||||
|
|||||||
@@ -257,6 +257,7 @@ open class ScrollMultiAutoCompleteTextView @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
fun postOnAnimation() {
|
fun postOnAnimation() {
|
||||||
if (mEatRunOnAnimationRequest) {
|
if (mEatRunOnAnimationRequest) {
|
||||||
mReSchedulePostAnimationCallback = true
|
mReSchedulePostAnimationCallback = true
|
||||||
|
|||||||
@@ -258,6 +258,7 @@ class ScrollTextView(context: Context, attrs: AttributeSet?) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
fun postOnAnimation() {
|
fun postOnAnimation() {
|
||||||
if (mEatRunOnAnimationRequest) {
|
if (mEatRunOnAnimationRequest) {
|
||||||
mReSchedulePostAnimationCallback = true
|
mReSchedulePostAnimationCallback = true
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ jsoupxpath = "2.5.3"
|
|||||||
coroutines = "1.8.1"
|
coroutines = "1.8.1"
|
||||||
liveeventbus = "1.8.14"
|
liveeventbus = "1.8.14"
|
||||||
markwon = "4.6.2"
|
markwon = "4.6.2"
|
||||||
material = "1.11.0"
|
material = "1.12.0"
|
||||||
media = "1.7.0"
|
media = "1.7.0"
|
||||||
media3 = "1.4.0"
|
media3 = "1.4.0"
|
||||||
nanoHttpd = "2.3.1"
|
nanoHttpd = "2.3.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user