Merge "Allow hotseat edu in landscape mode" into ub-launcher3-rvc-dev am: 07e2b4b6e7

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/11531791

Change-Id: Ia46130b013096a8d90604eec513e42e9edfe8ab7
This commit is contained in:
Samuel Fufa 2020-06-04 19:52:53 +00:00 committed by Automerger Merge Worker
commit fb318873f8
2 changed files with 19 additions and 5 deletions

View File

@ -145,11 +145,23 @@ public class HotseatEduDialog extends AbstractSlideInView implements Insettable
int rightInset = insets.right - mInsets.right;
int bottomInset = insets.bottom - mInsets.bottom;
mInsets.set(insets);
if (mLauncher.getOrientation() == Configuration.ORIENTATION_PORTRAIT) {
setPadding(leftInset, getPaddingTop(), rightInset, 0);
mHotseatWrapper.setPadding(mHotseatWrapper.getPaddingLeft(), getPaddingTop(),
mHotseatWrapper.getPaddingRight(), bottomInset);
mHotseatWrapper.getLayoutParams().height =
mLauncher.getDeviceProfile().hotseatBarSizePx + insets.bottom;
} else {
setPadding(0, getPaddingTop(), 0, 0);
mHotseatWrapper.setPadding(mHotseatWrapper.getPaddingLeft(), getPaddingTop(),
mHotseatWrapper.getPaddingRight(),
(int) getResources().getDimension(R.dimen.bottom_sheet_edu_padding));
((TextView) findViewById(R.id.hotseat_edu_heading)).setText(
R.string.hotseat_edu_title_migrate_landscape);
((TextView) findViewById(R.id.hotseat_edu_content)).setText(
R.string.hotseat_edu_message_migrate_landscape);
}
}
private void logUserAction(boolean migrated, int pageIndex) {

View File

@ -65,8 +65,10 @@
<!-- Hotseat educational strings for users who don't qualify for migration -->
<string name="hotseat_edu_title_migrate">Get app suggestions on the bottom row of your Home screen</string>
<string name="hotseat_edu_title_migrate_landscape">Get app suggestions on favorites row of your Home screen</string>
<string name="hotseat_edu_message_migrate">Easily access your most-used apps right on the Home screen. Suggestions will change based on your routines. Apps on the bottom row will move up to your Home screen. </string>
<string name="hotseat_edu_message_migrate_landscape">Easily access your most-used apps right on the Home screen. Suggestions will change based on your routines. Apps in favorites row will move to your Home screen. </string>
<string name="hotseat_edu_message_migrate_alt">Easily access your most-used apps, right on the Home screen. Suggestions will change based on your routines. Apps on the bottom row will move to a new folder.</string>
<!-- Button text to opt in for fully predicted hotseat -->