Add the max height restriction into the illustration view.
Bug: 191721423 Test: manual test Change-Id: I3829ead500eaf586f6d543855690ee8f0d0913ff
This commit is contained in:
@@ -406,10 +406,13 @@ public abstract class ToggleFeaturePreferenceFragment extends SettingsPreference
|
||||
return;
|
||||
}
|
||||
|
||||
final int displayHalfHeight =
|
||||
AccessibilityUtil.getDisplayBounds(getPrefContext()).height() / 2;
|
||||
final IllustrationPreference illustrationPreference =
|
||||
new IllustrationPreference(getPrefContext());
|
||||
illustrationPreference.setImageUri(mImageUri);
|
||||
illustrationPreference.setSelectable(false);
|
||||
illustrationPreference.setMaxHeight(displayHalfHeight);
|
||||
illustrationPreference.setKey(KEY_ANIMATED_IMAGE);
|
||||
|
||||
getPreferenceScreen().addPreference(illustrationPreference);
|
||||
|
Reference in New Issue
Block a user