feat: 优化代码

pull/167/head
kunfei 5 years ago
parent 41ff8c1c65
commit 97b644db0f
  1. 4
      app/src/main/java/io/legado/app/ui/widget/SearchView.kt
  2. 1
      app/src/main/res/layout/view_search.xml

@ -91,9 +91,8 @@ class SearchView : SearchView {
super.setQueryHint(hint)
updateQueryHint()
}
}
internal class CenteredImageSpan(drawable: Drawable?) : ImageSpan(drawable!!) {
internal class CenteredImageSpan(drawable: Drawable?) : ImageSpan(drawable!!) {
override fun draw(
canvas: Canvas, text: CharSequence,
start: Int, end: Int, x: Float,
@ -110,4 +109,5 @@ internal class CenteredImageSpan(drawable: Drawable?) : ImageSpan(drawable!!) {
b.draw(canvas)
canvas.restore()
}
}
}

@ -14,5 +14,4 @@
app:queryBackground="@null"
app:submitBackground="@null"
app:searchHintIcon="@drawable/ic_search_hint"
app:goIcon="@drawable/ic_search"
app:defaultQueryHint="搜索"/>
Loading…
Cancel
Save