diff --git a/app/src/main/java/io/legado/app/ui/widget/text/AutoCompleteTextView.kt b/app/src/main/java/io/legado/app/ui/widget/text/AutoCompleteTextView.kt index f42cda253..262c7c8e5 100644 --- a/app/src/main/java/io/legado/app/ui/widget/text/AutoCompleteTextView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/text/AutoCompleteTextView.kt @@ -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 { diff --git a/app/src/main/java/io/legado/app/ui/widget/text/ScrollMultiAutoCompleteTextView.kt b/app/src/main/java/io/legado/app/ui/widget/text/ScrollMultiAutoCompleteTextView.kt index a9f0e6460..18a5f6e92 100644 --- a/app/src/main/java/io/legado/app/ui/widget/text/ScrollMultiAutoCompleteTextView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/text/ScrollMultiAutoCompleteTextView.kt @@ -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) {