mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 19:28:10 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user