diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java index e705d94d23..51d1c9f028 100644 --- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java +++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java @@ -331,6 +331,9 @@ public class AllAppsRecyclerView extends FastScrollRecyclerView { public void setLettersToScrollLayout( List fastScrollSections) { + if (fastScrollSections.isEmpty()) { + return; + } if (mLetterList != null) { mLetterList.removeAllViews(); } @@ -364,6 +367,8 @@ public class AllAppsRecyclerView extends FastScrollRecyclerView { mLetterList.addView(lastLetterListTextView); constraintTextViewsVertically(mLetterList, textViews); mLetterList.setVisibility(VISIBLE); + // Set the alpha to 0 to avoid the letter list being shown when it shouldn't be. + mLetterList.setAlpha(0); } private void constraintTextViewsVertically(ConstraintLayout constraintLayout,