mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 08:56:55 +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:
@@ -75,4 +75,15 @@ public class SeascapePagedViewHandler extends LandscapePagedViewHandler {
|
||||
public float getTaskMenuY(float y, View thumbnailView) {
|
||||
return y + thumbnailView.getMeasuredHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getClearAllScrollOffset(View view, boolean isRtl) {
|
||||
return (isRtl ? view.getPaddingTop() : - view.getPaddingBottom()) / 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPrimaryAndResetSecondaryTranslate(View view, float translation) {
|
||||
view.setTranslationX(0);
|
||||
view.setTranslationY(-translation);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user