New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (11/n).

- Create the display size LabeledSeekBarPreference and add the entry
1) It's integrated with the system display density configurations.
2) Create the new DisplaySizeData component to store the configurations related to the display size features.

Bug: 211503117
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DisplaySizeDataTest
Change-Id: If9e5cc6e2ff2c4f530634e39eb3cddd9e275bc03
This commit is contained in:
Peter_Liang
2022-01-21 02:26:19 +08:00
parent 4681ef2b47
commit 0eee699438
4 changed files with 133 additions and 1 deletions

View File

@@ -36,6 +36,7 @@ import java.util.List;
public class TextReadingPreferenceFragment extends DashboardFragment {
private static final String TAG = "TextReadingPreferenceFragment";
private static final String FONT_SIZE_KEY = "font_size";
private static final String DISPLAY_SIZE_KEY = "display_size";
@Override
protected int getPreferenceScreenResId() {
@@ -56,8 +57,10 @@ public class TextReadingPreferenceFragment extends DashboardFragment {
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
final FontSizeData fontSizeData = new FontSizeData(context);
final DisplaySizeData displaySizeData = new DisplaySizeData(context);
controllers.add(new PreviewSizeSeekBarController(context, FONT_SIZE_KEY, fontSizeData));
controllers.add(
new PreviewSizeSeekBarController(context, DISPLAY_SIZE_KEY, displaySizeData));
return controllers;
}