Commit c5f0580d authored by Sinan Sahin's avatar Sinan Sahin Committed by Commit Bot

[Offline indicator v2] Fix for RecentTabsPage

This CL updates the RecentTabsPage to change its padding without any
animation when the top controls height changes.

Bug: 1059438
Change-Id: I95cbf5a98dad9476c9803cf93f3a926a102c9cea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2125190Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Sinan Sahin <sinansahin@google.com>
Cr-Commit-Position: refs/heads/master@{#754530}
parent 06949117
......@@ -310,9 +310,18 @@ public class RecentTabsPage
@Override
public void onBottomControlsHeightChanged(
int bottomControlsHeight, int bottomControlsMinHeight) {
updatePadding();
}
@Override
public void onTopControlsHeightChanged(int topControlsHeight, int topControlsMinHeight) {
updatePadding();
}
private void updatePadding() {
final View recentTabsRoot = mView.findViewById(R.id.recent_tabs_root);
ViewCompat.setPaddingRelative(recentTabsRoot, ViewCompat.getPaddingStart(recentTabsRoot),
mFullscreenManager.getTopControlsHeight(), ViewCompat.getPaddingEnd(recentTabsRoot),
bottomControlsHeight);
mFullscreenManager.getBottomControlsHeight());
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment