Add spannedDrawable for the divider in the letter fastScroller.
Divider exported from: https://www.figma.com/design/uMzPkNMZpb7EyfHDo8usIa/V-%E2%80%A2-Toast-Butter?node-id=2751-194737&node-type=frame&m=dev bug:358673724 Test photo: https://drive.google.com/file/d/1I_Mu7mjxboP3puAJuiA9X9V3ogFR0oin/view?usp=sharing Flag: com.android.launcher3.letter_fast_scroller Change-Id: Ica5f05befbd63dc93b9c50bbbd6821cd931d148b
This commit is contained in:
1 parent
9d60a18c5c
commit
c9ac51c521
2 files changed
+36
No files matched your search
@@ -106,6 +106,7 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement
|
||||
// The of ordered component names as a result of a search query
|
||||
private final ArrayList<AdapterItem> mSearchResults = new ArrayList<>();
|
||||
private final SpannableString mPrivateProfileAppScrollerBadge;
|
||||
private final SpannableString mPrivateProfileDividerBadge;
|
||||
private BaseAllAppsAdapter<T> mAdapter;
|
||||
private AppInfoComparator mAppNameComparator;
|
||||
private int mNumAppsPerRowAllApps;
|
||||
@@ -128,6 +129,10 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement
|
||||
? R.drawable.ic_private_profile_letter_list_fast_scroller_badge :
|
||||
R.drawable.ic_private_profile_app_scroller_badge, ImageSpan.ALIGN_CENTER),
|
||||
0, 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
mPrivateProfileDividerBadge = new SpannableString(" ");
|
||||
mPrivateProfileDividerBadge.setSpan(new ImageSpan(context,
|
||||
R.drawable.ic_private_profile_divider_badge, ImageSpan.ALIGN_CENTER),
|
||||
0, 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
|
||||
/** Set the number of apps per row when device profile changes. */
|
||||
@@ -405,6 +410,11 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement
|
||||
// Add system apps separator.
|
||||
if (Flags.privateSpaceSysAppsSeparation()) {
|
||||
position = mPrivateProviderManager.addSystemAppsDivider(mAdapterItems);
|
||||
if (Flags.letterFastScroller()) {
|
||||
FastScrollSectionInfo sectionInfo =
|
||||
new FastScrollSectionInfo(mPrivateProfileDividerBadge, position);
|
||||
mFastScrollerSections.add(sectionInfo);
|
||||
}
|
||||
}
|
||||
// Add system apps.
|
||||
position = addAppsWithSections(split.get(false), position);
|
||||
|
||||
Reference in new issue
Block a user