This commit is contained in:
Horis
2024-08-27 12:56:45 +08:00
parent 5b917597ad
commit 747ddd04fe
8 changed files with 11 additions and 7 deletions
@@ -591,9 +591,9 @@ class ReadBookActivity : BaseReadBookActivity(),
/**
* 按键拦截,显示菜单
*/
override fun dispatchKeyEvent(event: KeyEvent?): Boolean {
val keyCode = event?.keyCode
val action = event?.action
override fun dispatchKeyEvent(event: KeyEvent): Boolean {
val keyCode = event.keyCode
val action = event.action
val isDown = action == 0
if (keyCode == KeyEvent.KEYCODE_MENU) {
@@ -28,8 +28,7 @@ import androidx.recyclerview.widget.RecyclerView.OnItemTouchListener
import io.legado.app.BuildConfig
import io.legado.app.ui.widget.recycler.DragSelectTouchHelper.AdvanceCallback.Mode
import io.legado.app.utils.DebugLog
import java.util.*
import java.util.Locale
import kotlin.math.max
import kotlin.math.min
@@ -52,7 +51,7 @@ import kotlin.math.min
* | | ----------------------------------------------> | |
* +-------------------+ +-----------------------+
*/
@Suppress("unused", "MemberVisibilityCanBePrivate")
@Suppress("unused", "MemberVisibilityCanBePrivate", "DEPRECATION")
class DragSelectTouchHelper(
/**
* Developer callback which controls the behavior of DragSelectTouchHelper.
@@ -288,6 +288,7 @@ class FastScroller : LinearLayout {
visibility = if (enabled) View.VISIBLE else View.INVISIBLE
}
@Suppress("DEPRECATION")
@SuppressLint("ClickableViewAccessibility")
override fun onTouchEvent(event: MotionEvent): Boolean {
when (event.action) {
@@ -59,6 +59,7 @@ class VerticalSeekBar @JvmOverloads constructor(context: Context, attrs: Attribu
if (!isInEditMode) {
applyTint(context.accentColor)
}
@Suppress("DEPRECATION")
ViewCompat.setLayoutDirection(this, ViewCompat.LAYOUT_DIRECTION_LTR)
if (attrs != null) {
@@ -130,6 +130,7 @@ class VerticalSeekBarWrapper @JvmOverloads constructor(
applyViewRotation(width, height)
}
@Suppress("DEPRECATION")
private fun applyViewRotation(w: Int, h: Int) {
val seekBar = childSeekBar
@@ -257,6 +257,7 @@ open class ScrollMultiAutoCompleteTextView @JvmOverloads constructor(
}
}
@Suppress("DEPRECATION")
fun postOnAnimation() {
if (mEatRunOnAnimationRequest) {
mReSchedulePostAnimationCallback = true
@@ -258,6 +258,7 @@ class ScrollTextView(context: Context, attrs: AttributeSet?) :
}
}
@Suppress("DEPRECATION")
fun postOnAnimation() {
if (mEatRunOnAnimationRequest) {
mReSchedulePostAnimationCallback = true