Support highlightable Settings homepage menu for 2-pane

1. Add a preference group adapter to perform highlighting
2. Add a class for mapping highlighable menu keys and preference keys
3. Add an API to determine if the screen is in split mode

Bug: 199017944
Test: manual, build
Change-Id: I8e3fe5fb96480a31ee0f3b3afb6ad78999d3d2bc
This commit is contained in:
Jason Chiu
2021-09-09 16:54:01 +08:00
parent 02b3384ae1
commit 9037ceabd3
18 changed files with 775 additions and 91 deletions

View File

@@ -47,9 +47,9 @@ public interface DashboardFeatureProvider {
* Binds preference to data provided by tile and gets dynamic data observers.
*
* @param activity If tile contains intent to launch, it will be launched from this activity
* @param fragment The fragment that the preference will be bound to
* @param forceRoundedIcon Whether or not injected tiles from other packages should be forced to
* rounded icon.
* @param sourceMetricsCategory The context (source) from which an action is performed
* @param pref The preference to bind data
* @param tile The binding data
* @param key They key for preference. If null, we will generate one from tile data
@@ -58,7 +58,7 @@ public interface DashboardFeatureProvider {
* @return The list of dynamic data observers
*/
List<DynamicDataObserver> bindPreferenceToTileAndGetObservers(FragmentActivity activity,
boolean forceRoundedIcon, int sourceMetricsCategory, Preference pref, Tile tile,
DashboardFragment fragment, boolean forceRoundedIcon, Preference pref, Tile tile,
String key, int baseOrder);
/**