This commit is contained in:
Horis 2024-12-28 19:53:22 +08:00
parent 94ef331b22
commit f5ce657d1d
2 changed files with 8 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package io.legado.app.ui.widget.text
import android.annotation.SuppressLint
import android.content.Context
import android.os.Build
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.MotionEvent
@ -28,6 +29,9 @@ class AutoCompleteTextView @JvmOverloads constructor(
init {
applyTint(context.accentColor)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
isLocalePreferredLineHeightForMinimumUsed = false
}
}
override fun enoughToFilter(): Boolean {

View File

@ -2,6 +2,7 @@ package io.legado.app.ui.widget.text
import android.annotation.SuppressLint
import android.content.Context
import android.os.Build
import android.util.AttributeSet
import android.view.GestureDetector
import android.view.MotionEvent
@ -80,6 +81,9 @@ open class ScrollMultiAutoCompleteTextView @JvmOverloads constructor(
mTouchSlop = vc.scaledTouchSlop
mMinFlingVelocity = vc.scaledMinimumFlingVelocity
mMaxFlingVelocity = vc.scaledMaximumFlingVelocity
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
isLocalePreferredLineHeightForMinimumUsed = false
}
}
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {