Update font/display size pages for support large screen in SuW
- Follow the SuW design of the UI guideline. - Add the footer button for each pages. - Add a new AccessibilityScreenSizeForSetupWizardActivity for SuW. - Add suw_font_size_fragment.xml and suw_screen_zoom_fragment.xml for each fragment. - Shorten 50% of the preview height. Bug: 194447311 Fixes: 199369859 Test: manual test Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.accessibility Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.display Change-Id: I2685e96d37d542490521ec24cfce490f87cbd88d
This commit is contained in:
@@ -18,9 +18,16 @@ package com.android.settings.display;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
|
||||
import com.android.settings.R;
|
||||
|
||||
public class FontSizePreferenceFragmentForSetupWizard
|
||||
extends ToggleFontSizePreferenceFragment {
|
||||
|
||||
@Override
|
||||
protected int getActivityLayoutResId() {
|
||||
return R.layout.suw_font_size_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return SettingsEnums.SUW_ACCESSIBILITY_FONT_SIZE;
|
||||
|
@@ -109,6 +109,10 @@ public class PreviewPagerAdapter extends PagerAdapter {
|
||||
return (view == object);
|
||||
}
|
||||
|
||||
FrameLayout[] getPreviewFrames() {
|
||||
return mPreviewFrames;
|
||||
}
|
||||
|
||||
boolean isAnimating() {
|
||||
return mAnimationCounter > 0;
|
||||
}
|
||||
|
@@ -264,6 +264,12 @@ public abstract class PreviewSeekBarPreferenceFragment extends SettingsPreferenc
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
mPreviewPager.sendAccessibilityEvent(AccessibilityEvent.TYPE_ANNOUNCEMENT);
|
||||
// To avoid displaying previous page on the left side in SUW landscape mode for
|
||||
// large size.
|
||||
if (position > 0) {
|
||||
mPreviewPagerAdapter.getPreviewFrames()[position - 1].setVisibility(View.INVISIBLE);
|
||||
}
|
||||
mPreviewPagerAdapter.getPreviewFrames()[position].setVisibility(View.VISIBLE);
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -18,8 +18,15 @@ package com.android.settings.display;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
|
||||
import com.android.settings.R;
|
||||
|
||||
public class ScreenZoomPreferenceFragmentForSetupWizard extends ScreenZoomSettings {
|
||||
|
||||
@Override
|
||||
protected int getActivityLayoutResId() {
|
||||
return R.layout.suw_screen_zoom_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return SettingsEnums.SUW_ACCESSIBILITY_DISPLAY_SIZE;
|
||||
|
Reference in New Issue
Block a user