diff --git a/quickstep/res/layout/predicted_hotseat_edu.xml b/quickstep/res/layout/predicted_hotseat_edu.xml index 1dab48267b..e4e3956c6e 100644 --- a/quickstep/res/layout/predicted_hotseat_edu.xml +++ b/quickstep/res/layout/predicted_hotseat_edu.xml @@ -73,6 +73,7 @@ launcher:containerType="hotseat" /> implements I mHotseatWrapper = findViewById(R.id.hotseat_wrapper); mSampleHotseat = findViewById(R.id.sample_prediction); + Context context = getContext(); DeviceProfile grid = mActivityContext.getDeviceProfile(); - Rect padding = grid.getHotseatLayoutPadding(getContext()); + Rect padding = grid.getHotseatLayoutPadding(context); mSampleHotseat.getLayoutParams().height = grid.cellHeightPx; mSampleHotseat.setGridSize(grid.numShownHotseatIcons, 1); @@ -102,6 +106,15 @@ public class HotseatEduDialog extends AbstractSlideInView implements I mDismissBtn = findViewById(R.id.no_thanks); mDismissBtn.setOnClickListener(this::onDismiss); + LinearLayout buttonContainer = findViewById(R.id.button_container); + int adjustedMarginEnd = ApiWrapper.getHotseatEndOffset(context) + - buttonContainer.getPaddingEnd(); + if (InvariantDeviceProfile.INSTANCE.get(context) + .getDeviceProfile(context).isTaskbarPresent && adjustedMarginEnd > 0) { + ((LinearLayout.LayoutParams) buttonContainer.getLayoutParams()).setMarginEnd( + adjustedMarginEnd); + } + // update ui to reflect which migration method is going to be used if (FeatureFlags.HOTSEAT_MIGRATE_TO_FOLDER.get()) { ((TextView) findViewById(R.id.hotseat_edu_content)).setText(