summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorDirk Sierd de Vries <contact@lecapuchon.nl>2026-08-15 23:25:56 +0200
committerDirk Sierd de Vries <contact@lecapuchon.nl>2026-08-15 23:25:56 +0200
commit6fd81de4995c597fd7a46ec9276e096450e00f64 (patch)
tree192e46c67185a7ab0338ad30cc18f21952d2077b /app/src
parent33b87f43d1543744d346d0d12629605f2a551b2e (diff)
downloadSidePhOnelauncher-6fd81de4995c597fd7a46ec9276e096450e00f64.tar.gz
SidePhOnelauncher-6fd81de4995c597fd7a46ec9276e096450e00f64.tar.bz2
SidePhOnelauncher-6fd81de4995c597fd7a46ec9276e096450e00f64.zip
Hide app drawer search cursor
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/app/sidephonelauncher/ui/AppDrawerFragment.kt7
1 files changed, 6 insertions, 1 deletions
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<View>(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 {