Insert dynamic dashboard tiles into optional placeholders

Insteads of inserting tile onto screen using absolute priority values,
now each page can have a placeholder preference, and at run time we will
add dynamic dashboard tiles to placeholder's place.

Bug: 32827787
Test: RunSettingsRoboTests
Change-Id: I1fe9e11dce4eb6fb4a9b56af05a2b8e5cdae00d2
This commit is contained in:
Fan Zhang
2016-11-11 13:23:21 -08:00
parent 3b4d72721d
commit 9dc9c6174c
10 changed files with 223 additions and 29 deletions

View File

@@ -781,8 +781,8 @@ public class SecuritySettings extends SettingsPreferenceFragment
final List<Preference> preferences = new ArrayList<>();
for (Tile tile : tiles) {
final Preference pref = new Preference(getPrefContext());
mDashboardFeatureProvider
.bindPreferenceToTile(getActivity(), pref, tile, null /* key */);
mDashboardFeatureProvider.bindPreferenceToTile(getActivity(), pref, tile,
null /* key */, Preference.DEFAULT_ORDER/* baseOrder */);
preferences.add(pref);
}
return preferences;