Use appropriate start padding for clear all button

This still shows up a bit strange with
notched phones because we are using
RecentsView padding to give ClearAll the
right amount of spacing. However, we're only
adding padding to the left and right and not
the top/bottom.
That's captured here: b/154436527

Fixes: 150389833
Test: Tested landscape/portrait/seascape
launcher, w/ RTL as well

Change-Id: I49defd58048e609a1f7a821abb97374bcbb94b9f
This commit is contained in:
Vinit Nayak
2020-04-19 19:21:29 -07:00
parent 2f04a9d271
commit 48ea9e9502
5 changed files with 24 additions and 1 deletions

View File

@@ -125,6 +125,11 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler {
return rect.height();
}
@Override
public int getClearAllScrollOffset(View view, boolean isRtl) {
return (isRtl ? view.getPaddingBottom() : - view.getPaddingTop()) / 2;
}
@Override
public int getSecondaryDimension(View view) {
return view.getWidth();