From 6fd81de4995c597fd7a46ec9276e096450e00f64 Mon Sep 17 00:00:00 2001 From: Dirk Sierd de Vries Date: Sat, 15 Aug 2026 23:25:56 +0200 Subject: Hide app drawer search cursor --- app/src/main/java/app/sidephonelauncher/ui/AppDrawerFragment.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/sidephonelauncher/ui/AppDrawerFragment.kt b/app/src/main/java/app/sidephonelauncher/ui/AppDrawerFragment.kt index 70514ed..7ef3ef2 100644 --- a/app/src/main/java/app/sidephonelauncher/ui/AppDrawerFragment.kt +++ b/app/src/main/java/app/sidephonelauncher/ui/AppDrawerFragment.kt @@ -203,7 +203,7 @@ class AppDrawerFragment : Fragment() { searchTextView?.apply { isFocusable = enabled isFocusableInTouchMode = enabled - isCursorVisible = enabled + isCursorVisible = false } } @@ -220,6 +220,7 @@ class AppDrawerFragment : Fragment() { searchTextView?.typeface = Typeface.DEFAULT searchTextView?.imeOptions = EditorInfo.IME_ACTION_SEARCH or EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING + searchTextView?.isCursorVisible = false setSearchFocusEnabled(prefs.autoShowKeyboard) } catch (e: Exception) { e.printStackTrace() @@ -527,6 +528,8 @@ class AppDrawerFragment : Fragment() { private fun focusRecyclerItem(position: Int, attempt: Int = 0) { binding.recyclerView.scrollToPosition(position) binding.recyclerView.post { + val binding = _binding ?: return@post + if (!isAdded) return@post val holder = binding.recyclerView.findViewHolderForAdapterPosition(position) val itemView = holder?.itemView?.findViewById(R.id.appRow) ?: holder?.itemView if (itemView != null) { @@ -610,6 +613,8 @@ class AppDrawerFragment : Fragment() { pendingInitialListFocus = false binding.search.post { + val binding = _binding ?: return@post + if (!isAdded) return@post binding.search.isIconified = false binding.search.requestFocus() searchTextView?.apply { -- cgit v1.2.1