|
|
@@ -6,6 +6,7 @@ import android.content.Context
|
|
|
import android.graphics.Canvas
|
|
|
import android.graphics.Paint
|
|
|
import android.graphics.drawable.Drawable
|
|
|
+import android.os.Build
|
|
|
import android.text.Spannable
|
|
|
import android.text.SpannableStringBuilder
|
|
|
import android.text.style.ImageSpan
|
|
|
@@ -42,6 +43,9 @@ class SearchView @JvmOverloads constructor(
|
|
|
// 改变字体
|
|
|
textView!!.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14f)
|
|
|
textView!!.gravity = Gravity.CENTER_VERTICAL
|
|
|
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
|
|
|
+ textView!!.isLocalePreferredLineHeightForMinimumUsed = false
|
|
|
+ }
|
|
|
updateQueryHint()
|
|
|
} catch (e: Exception) {
|
|
|
e.printOnDebug()
|