Add bottom offset to the intial padding rather than accumulating it.

This prevents the padding from growing on screen rotations.

Fixes: 160005616
Test: manual
Test: atest ChooserActivityTest
Change-Id: I87fcfede3cf9cfad63adeb07b67ed68df403453f
This commit is contained in:
arangelov
2020-07-08 15:53:26 +01:00
parent 864e606c40
commit 96078b1052

View File

@@ -252,8 +252,10 @@ public class ChooserMultiProfilePagerAdapter extends AbstractMultiProfilePagerAd
@Override
protected void setupContainerPadding(View container) {
int initialBottomPadding = getContext().getResources().getDimensionPixelSize(
R.dimen.resolver_empty_state_container_padding_bottom);
container.setPadding(container.getPaddingLeft(), container.getPaddingTop(),
container.getPaddingRight(), container.getPaddingBottom() + mBottomOffset);
container.getPaddingRight(), initialBottomPadding + mBottomOffset);
}
class ChooserProfileDescriptor extends ProfileDescriptor {