Change search hint for device search

This commit is contained in:
Suphon Thanakornpakapong
2021-11-04 08:13:28 +07:00
parent a783e9eeda
commit 59340fdb8a
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -198,4 +198,5 @@
<string name="search_pref_result_shortcuts_title">Shortcuts</string>
<string name="search_pref_result_tips_title">Pixel Tips</string>
<string name="row_height_label">Row Height</string>
<string name="all_apps_device_search_hint">Search</string>
</resources>
@@ -62,7 +62,11 @@ class AllAppsSearchInput(context: Context, attrs: AttributeSet?) : LinearLayout(
input = ViewCompat.requireViewById(this, R.id.input)
with(input) {
setHint(R.string.all_apps_search_bar_hint)
if (LawnchairSearchAlgorithm.isDeviceSearchEnabled(context)) {
setHint(R.string.all_apps_device_search_hint)
} else {
setHint(R.string.all_apps_search_bar_hint)
}
addTextChangedListener {
actionButton.isVisible = !it.isNullOrEmpty()
}