diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/fragments/AllAppsFragment.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/fragments/AllAppsFragment.kt index 3178413..816c940 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/fragments/AllAppsFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/fragments/AllAppsFragment.kt @@ -182,9 +182,15 @@ class AllAppsFragment(context: Context, attributeSet: AttributeSet) : MyFragment search_bar.onSearchTextChangedListener = { (all_apps_grid.adapter as? LaunchersAdapter)?.updateSearchQuery(it) + showNoResultsPlaceholderIfNeeded() } } + private fun showNoResultsPlaceholderIfNeeded() { + val itemCount = all_apps_grid.adapter?.itemCount + no_results_placeholder.beVisibleIf(itemCount != null && itemCount == 0) + } + override fun onAppLauncherLongPressed(x: Float, y: Float, appLauncher: AppLauncher) { val gridItem = HomeScreenGridItem( null, diff --git a/app/src/main/res/layout/all_apps_fragment.xml b/app/src/main/res/layout/all_apps_fragment.xml index 61aa62a..7368361 100644 --- a/app/src/main/res/layout/all_apps_fragment.xml +++ b/app/src/main/res/layout/all_apps_fragment.xml @@ -26,4 +26,21 @@ app:spanCount="@integer/portrait_column_count" /> + + +