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

- Link-up between the preview, font size, and display size preferences.
- Add the preview preference and entry.

Bug: 211503117
Test: make RunSettingsRoboTests ROBOTEST_FILTER=TextReadingPreviewControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=TextReadingPreviewPreferenceTest
Change-Id: Ic6c48861a0051670fd78b13dca5488711de30cb8
This commit is contained in:
Peter_Liang
2022-01-27 15:37:36 +08:00
parent 0eee699438
commit edb52508d3
7 changed files with 386 additions and 11 deletions

View File

@@ -117,7 +117,15 @@ public class PreviewPagerAdapter extends PagerAdapter {
mAnimationEndAction = action;
}
void setPreviewLayer(int newLayerIndex, int currentLayerIndex, int currentFrameIndex,
/**
* Switches the sample layouts for the preview pager.
*
* @param newLayerIndex the new layer index
* @param currentLayerIndex the current layer index
* @param currentFrameIndex the current frame index
* @param animate whether to enable the animation
*/
public void setPreviewLayer(int newLayerIndex, int currentLayerIndex, int currentFrameIndex,
final boolean animate) {
for (FrameLayout previewFrame : mPreviewFrames) {
if (currentLayerIndex >= 0) {