Revert "Revert "Moving DeviceProfile properties into DevicePrope..."
Revert submission 33716851-revert-33672643-DataDeviceProfile1-XHYRAPLEBK Reason for revert: Error is fixed Reverted changes: /q/submissionid:33716851-revert-33672643-DataDeviceProfile1-XHYRAPLEBK Change-Id: Ib86824134955903c11e51e52dbfd6368aba1cd50
This commit is contained in:
1 parent
1bec329180
commit
e1d31e5406
128 files changed
+727
-597
No files matched your search
@@ -226,14 +226,14 @@ public class FloatingIconView extends FrameLayout implements
|
||||
// Position the floating view exactly on top of the original
|
||||
lp.topMargin = Math.round(pos.top);
|
||||
if (mIsRtl) {
|
||||
lp.setMarginStart(Math.round(mLauncher.getDeviceProfile().widthPx - pos.right));
|
||||
lp.setMarginStart(Math.round(mLauncher.getDeviceProfile().getDeviceProperties().getWidthPx() - pos.right));
|
||||
} else {
|
||||
lp.setMarginStart(Math.round(pos.left));
|
||||
}
|
||||
// Set the properties here already to make sure they are available when running the first
|
||||
// animation frame.
|
||||
int left = mIsRtl
|
||||
? mLauncher.getDeviceProfile().widthPx - lp.getMarginStart() - lp.width
|
||||
? mLauncher.getDeviceProfile().getDeviceProperties().getWidthPx() - lp.getMarginStart() - lp.width
|
||||
: lp.leftMargin;
|
||||
layout(left, lp.topMargin, left + lp.width, lp.topMargin + lp.height);
|
||||
}
|
||||
@@ -370,8 +370,8 @@ public class FloatingIconView extends FrameLayout implements
|
||||
|
||||
mFinalDrawableBounds.set(0, 0, originalWidth, originalHeight);
|
||||
|
||||
float aspectRatio = mLauncher.getDeviceProfile().aspectRatio;
|
||||
if (dp.isLandscape) {
|
||||
float aspectRatio = mLauncher.getDeviceProfile().getDeviceProperties().getAspectRatio();
|
||||
if (dp.getDeviceProperties().isLandscape()) {
|
||||
lp.width = (int) Math.max(lp.width, lp.height * aspectRatio);
|
||||
} else {
|
||||
lp.height = (int) Math.max(lp.height, lp.width * aspectRatio);
|
||||
|
||||
Reference in new issue
Block a user