mirror of
https://github.com/gedoor/legado.git
synced 2025-01-09 04:17:45 +08:00
优化
This commit is contained in:
parent
94ef331b22
commit
f5ce657d1d
@ -2,6 +2,7 @@ package io.legado.app.ui.widget.text
|
|||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.os.Build
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
@ -28,6 +29,9 @@ class AutoCompleteTextView @JvmOverloads constructor(
|
|||||||
|
|
||||||
init {
|
init {
|
||||||
applyTint(context.accentColor)
|
applyTint(context.accentColor)
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
|
||||||
|
isLocalePreferredLineHeightForMinimumUsed = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun enoughToFilter(): Boolean {
|
override fun enoughToFilter(): Boolean {
|
||||||
|
@ -2,6 +2,7 @@ package io.legado.app.ui.widget.text
|
|||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.os.Build
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.view.GestureDetector
|
import android.view.GestureDetector
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
@ -80,6 +81,9 @@ open class ScrollMultiAutoCompleteTextView @JvmOverloads constructor(
|
|||||||
mTouchSlop = vc.scaledTouchSlop
|
mTouchSlop = vc.scaledTouchSlop
|
||||||
mMinFlingVelocity = vc.scaledMinimumFlingVelocity
|
mMinFlingVelocity = vc.scaledMinimumFlingVelocity
|
||||||
mMaxFlingVelocity = vc.scaledMaximumFlingVelocity
|
mMaxFlingVelocity = vc.scaledMaximumFlingVelocity
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
|
||||||
|
isLocalePreferredLineHeightForMinimumUsed = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
||||||
|
Loading…
Reference in New Issue
Block a user