Merge "Remove unused Utilities methods related to motion event translation" into ub-launcher3-master
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 316e748..b07a400 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -33,8 +33,6 @@
<dimen name="dynamic_grid_workspace_page_spacing">8dp</dimen>
<!-- Minimum space between workspace and hotseat in spring loaded mode -->
<dimen name="dynamic_grid_min_spring_loaded_space">8dp</dimen>
- <dimen name="dynamic_grid_container_land_left_padding">118dp</dimen>
- <dimen name="dynamic_grid_container_land_right_padding">66dp</dimen>
<!-- Drop target bar -->
<dimen name="dynamic_grid_drop_target_size">48dp</dimen>
diff --git a/src/com/android/launcher3/BaseContainerView.java b/src/com/android/launcher3/BaseContainerView.java
index eb358ec..ac7cbaf 100644
--- a/src/com/android/launcher3/BaseContainerView.java
+++ b/src/com/android/launcher3/BaseContainerView.java
@@ -120,7 +120,7 @@
int paddingBottom;
DeviceProfile grid = Launcher.getLauncher(context).getDeviceProfile();
- int[] padding = grid.getContainerPadding(context);
+ int[] padding = grid.getContainerPadding();
paddingLeft = padding[0] + grid.edgeMarginPx;
paddingRight = padding[1] + grid.edgeMarginPx;
if (!grid.isVerticalBarLayout()) {
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 72004d6..51e174f 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -116,10 +116,6 @@
public int allAppsIconDrawablePaddingPx;
public float allAppsIconTextSizePx;
- // Containers
- private final int containerLeftPaddingPx;
- private final int containerRightPaddingPx;
-
// Drop Target
public int dropTargetBarSizePx;
@@ -184,10 +180,6 @@
hotseatBarTopPaddingPx =
res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_top_padding);
hotseatLandGutterPx = res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_gutter_width);
- containerLeftPaddingPx =
- res.getDimensionPixelSize(R.dimen.dynamic_grid_container_land_left_padding);
- containerRightPaddingPx =
- res.getDimensionPixelSize(R.dimen.dynamic_grid_container_land_right_padding);
// Determine sizes.
widthPx = width;
@@ -588,9 +580,7 @@
/**
* @return the left/right paddings for all containers.
*/
- public final int[] getContainerPadding(Context context) {
- Resources res = context.getResources();
-
+ public final int[] getContainerPadding() {
// No paddings for portrait phone
if (isPhone && !isVerticalBarLayout()) {
return new int[] {0, 0};
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 2161e39..173f4d1 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -1678,7 +1678,7 @@
if (mWorkspaceFadeInAdjacentScreens &&
!workspaceInModalState() &&
!mIsSwitchingState) {
- int screenCenter = getScrollX() + getViewportOffsetX() + getViewportWidth() / 2;
+ int screenCenter = getScrollX() + getViewportWidth() / 2;
for (int i = numCustomPages(); i < getChildCount(); i++) {
CellLayout child = (CellLayout) getChildAt(i);
if (child != null) {
@@ -1815,7 +1815,7 @@
}
});
}
-
+ updatePageAlphaValues();
}
@Override