mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Merge "Use getMeasuredWidth instead of getWidth in setSplitIconParams" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ad890ac5af
@@ -249,7 +249,7 @@ public class GroupedTaskView extends TaskView {
|
||||
boolean isRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
|
||||
|
||||
getPagedOrientationHandler().setSplitIconParams(mIconView, mIconView2,
|
||||
taskIconHeight, mSnapshotView.getWidth(), mSnapshotView.getHeight(),
|
||||
taskIconHeight, mSnapshotView.getMeasuredWidth(), mSnapshotView.getMeasuredHeight(),
|
||||
isRtl, deviceProfile, mSplitBoundsConfig);
|
||||
}
|
||||
|
||||
|
||||
@@ -541,17 +541,18 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
|
||||
|
||||
if (deviceProfile.isLandscape) {
|
||||
primaryIconParams.gravity = TOP | START;
|
||||
primaryIconView.setTranslationX(primarySnapshotWidth - primaryIconView.getWidth());
|
||||
primaryIconView.setTranslationX(
|
||||
primarySnapshotWidth - primaryIconView.getMeasuredWidth());
|
||||
primaryIconView.setTranslationY(0);
|
||||
secondaryIconParams.gravity = TOP | START;
|
||||
secondaryIconView.setTranslationX(primarySnapshotWidth + dividerBar);
|
||||
} else {
|
||||
primaryIconParams.gravity = TOP | CENTER_HORIZONTAL;
|
||||
primaryIconView.setTranslationX(-(primaryIconView.getWidth()) / 2f);
|
||||
primaryIconView.setTranslationX(-(primaryIconView.getMeasuredWidth()) / 2f);
|
||||
primaryIconView.setTranslationY(0);
|
||||
|
||||
secondaryIconParams.gravity = TOP | CENTER_HORIZONTAL;
|
||||
secondaryIconView.setTranslationX(secondaryIconView.getWidth() / 2f);
|
||||
secondaryIconView.setTranslationX(secondaryIconView.getMeasuredWidth() / 2f);
|
||||
}
|
||||
secondaryIconView.setTranslationY(0);
|
||||
primaryIconView.setLayoutParams(primaryIconParams);
|
||||
|
||||
Reference in New Issue
Block a user