summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/CellLayout.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2019-05-14 09:44:34 -0700
committerSunny Goyal <sunnygoyal@google.com>2019-05-15 11:21:34 -0700
commit41d51a0a15fe0017997fbdedd9c1d65aed27791b (patch)
tree23db4bcfdef255c92a3fb1f5a8d797ad3a65a65e /src/com/android/launcher3/CellLayout.java
parent4d3d51b3becacced0cd47502d63bc6f32a24de49 (diff)
downloadandroid_packages_apps_Trebuchet-41d51a0a15fe0017997fbdedd9c1d65aed27791b.tar.gz
android_packages_apps_Trebuchet-41d51a0a15fe0017997fbdedd9c1d65aed27791b.tar.bz2
android_packages_apps_Trebuchet-41d51a0a15fe0017997fbdedd9c1d65aed27791b.zip
Enabling fake rotation by default
Fake rotation is only enabled if homescreen rotation is not enabled Bug: 131360075 Change-Id: Ie56fc4b46b38d3a599ec6da3d506a971e73b0394
Diffstat (limited to 'src/com/android/launcher3/CellLayout.java')
-rw-r--r--src/com/android/launcher3/CellLayout.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index 3eb01e6c3..09fb2446d 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -845,7 +845,8 @@ public class CellLayout extends ViewGroup implements Transposable {
* width in {@link DeviceProfile#calculateCellWidth(int, int)}.
*/
public int getUnusedHorizontalSpace() {
- return getMeasuredWidth() - getPaddingLeft() - getPaddingRight() - (mCountX * mCellWidth);
+ return (mRotationMode.isTransposed ? getMeasuredHeight() : getMeasuredWidth())
+ - getPaddingLeft() - getPaddingRight() - (mCountX * mCellWidth);
}
public Drawable getScrimBackground() {