mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Center paired app icons
In splitscreen overview, the pair of app icons is now always centered at the top of the view, rather than following the divider's position. Test: Visually tested on local P6 device Fixes: 208648221 Change-Id: I460d06047693c9376dab8215085d54aa4164d69f
This commit is contained in:
@@ -482,17 +482,14 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler {
|
||||
(FrameLayout.LayoutParams) primaryIconView.getLayoutParams();
|
||||
FrameLayout.LayoutParams secondaryIconParams =
|
||||
new FrameLayout.LayoutParams(primaryIconParams);
|
||||
int dividerBar = (splitConfig.appsStackedVertically ?
|
||||
splitConfig.visualDividerBounds.height() :
|
||||
splitConfig.visualDividerBounds.width());
|
||||
|
||||
primaryIconParams.gravity = (isRtl ? START : END) | TOP;
|
||||
primaryIconView.setTranslationY(primarySnapshotHeight - primaryIconView.getHeight() / 2f);
|
||||
primaryIconParams.gravity = CENTER_VERTICAL | (isRtl ? START : END);
|
||||
primaryIconView.setTranslationX(0);
|
||||
|
||||
secondaryIconParams.gravity = (isRtl ? START : END) | TOP;
|
||||
secondaryIconView.setTranslationY(primarySnapshotHeight + taskIconHeight + dividerBar);
|
||||
primaryIconView.setTranslationY(-(taskIconHeight / 2f));
|
||||
secondaryIconParams.gravity = CENTER_VERTICAL | (isRtl ? START : END);
|
||||
secondaryIconView.setTranslationX(0);
|
||||
secondaryIconView.setTranslationY(taskIconHeight / 2f);
|
||||
|
||||
primaryIconView.setLayoutParams(primaryIconParams);
|
||||
secondaryIconView.setLayoutParams(secondaryIconParams);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user