From dd2d4514c283cc21060fcc3d2aa14f2407d583c3 Mon Sep 17 00:00:00 2001 From: Le Bao Nguyen Date: Fri, 25 Jul 2025 11:13:19 +0700 Subject: [PATCH] Fix the search bar needing 2 taps sometimes (#5654) --- lawnchair/src/app/lawnchair/allapps/AllAppsSearchInput.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lawnchair/src/app/lawnchair/allapps/AllAppsSearchInput.kt b/lawnchair/src/app/lawnchair/allapps/AllAppsSearchInput.kt index 89386e3b8c..a446dd0a3b 100644 --- a/lawnchair/src/app/lawnchair/allapps/AllAppsSearchInput.kt +++ b/lawnchair/src/app/lawnchair/allapps/AllAppsSearchInput.kt @@ -190,7 +190,6 @@ class AllAppsSearchInput(context: Context, attrs: AttributeSet?) : val currentPaddingLeft = initialPaddingLeft val currentPaddingRight = initialPaddingRight input.onFocusChangeListener = OnFocusChangeListener { _, hasFocus -> - if (hasFocus) { if (prefs2.searchAlgorithm.firstBlocking() != LawnchairSearchAlgorithm.APP_SEARCH) { input.setHint(R.string.all_apps_device_search_hint) @@ -201,6 +200,10 @@ class AllAppsSearchInput(context: Context, attrs: AttributeSet?) : setBackgroundVisibility(false, 0f) animateHintVisibility(true) animatePadding(currentPaddingLeft / 2, currentPaddingRight / 2) + + // Sometimes the user has to click the input bar one more time + // for the keyboard to show. + input.showKeyboard() } else { setBackgroundVisibility(true, 1f) animateHintVisibility(false)