Horis hace 2 años
padre
commit
747ddd04fe

+ 3 - 3
app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt

@@ -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) {

+ 2 - 3
app/src/main/java/io/legado/app/ui/widget/recycler/DragSelectTouchHelper.kt

@@ -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.

+ 1 - 0
app/src/main/java/io/legado/app/ui/widget/recycler/scroller/FastScroller.kt

@@ -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) {

+ 1 - 0
app/src/main/java/io/legado/app/ui/widget/seekbar/VerticalSeekBar.kt

@@ -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) {

+ 1 - 0
app/src/main/java/io/legado/app/ui/widget/seekbar/VerticalSeekBarWrapper.kt

@@ -130,6 +130,7 @@ class VerticalSeekBarWrapper @JvmOverloads constructor(
         applyViewRotation(width, height)
     }
 
+    @Suppress("DEPRECATION")
     private fun applyViewRotation(w: Int, h: Int) {
         val seekBar = childSeekBar
 

+ 1 - 0
app/src/main/java/io/legado/app/ui/widget/text/ScrollMultiAutoCompleteTextView.kt

@@ -257,6 +257,7 @@ open class ScrollMultiAutoCompleteTextView @JvmOverloads constructor(
             }
         }
 
+        @Suppress("DEPRECATION")
         fun postOnAnimation() {
             if (mEatRunOnAnimationRequest) {
                 mReSchedulePostAnimationCallback = true

+ 1 - 0
app/src/main/java/io/legado/app/ui/widget/text/ScrollTextView.kt

@@ -258,6 +258,7 @@ class ScrollTextView(context: Context, attrs: AttributeSet?) :
             }
         }
 
+        @Suppress("DEPRECATION")
         fun postOnAnimation() {
             if (mEatRunOnAnimationRequest) {
                 mReSchedulePostAnimationCallback = true

+ 1 - 1
gradle/libs.versions.toml

@@ -27,7 +27,7 @@ jsoupxpath = "2.5.3"
 coroutines = "1.8.1"
 liveeventbus = "1.8.14"
 markwon = "4.6.2"
-material = "1.11.0"
+material = "1.12.0"
 media = "1.7.0"
 media3 = "1.4.0"
 nanoHttpd = "2.3.1"