summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornebkat <nebkat@teamhacksung.org>2012-12-24 05:48:36 -0800
committerGerrit Code Review <gerrit@review.cyanogenmod.com>2012-12-24 05:48:36 -0800
commitb79406c0a85568dbc9150bbdb5339405b924f1fb (patch)
treee7c75b5e36757383a328a06efc9a1f94a878ba53
parent3f4a94b7328c129cbf94fb958b2fb75942b69d20 (diff)
parent53b9dc7f0ff23e926ab9a2ff2f79d9291d36a53e (diff)
downloadpackages_apps_trebuchet-b79406c0a85568dbc9150bbdb5339405b924f1fb.zip
packages_apps_trebuchet-b79406c0a85568dbc9150bbdb5339405b924f1fb.tar.gz
packages_apps_trebuchet-b79406c0a85568dbc9150bbdb5339405b924f1fb.tar.bz2
Merge "Hotseat: Lanscape layout fixes" into cm-10.1
-rw-r--r--src/com/cyanogenmod/trebuchet/Hotseat.java5
-rw-r--r--src/com/cyanogenmod/trebuchet/Workspace.java10
2 files changed, 9 insertions, 6 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Hotseat.java b/src/com/cyanogenmod/trebuchet/Hotseat.java
index e6fe065..600c254 100644
--- a/src/com/cyanogenmod/trebuchet/Hotseat.java
+++ b/src/com/cyanogenmod/trebuchet/Hotseat.java
@@ -70,7 +70,7 @@ public class Hotseat extends PagedView {
mCellCount = cellCount;
}
- mVertical = mIsLandscape;
+ mVertical = hasVerticalHotseat();
LayoutInflater inflater =
(LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
@@ -118,6 +118,9 @@ public class Hotseat extends PagedView {
int getCellYFromOrder(int rank) {
return hasVerticalHotseat() ? (mCellCount - rank - 1) : 0;
}
+ int getScreenFromOrder(int screen) {
+ return hasVerticalHotseat() ? (getChildCount() - screen - 1) : screen;
+ }
@Override
protected void onFinishInflate() {
diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java
index 7c30386..fa0c9ec 100644
--- a/src/com/cyanogenmod/trebuchet/Workspace.java
+++ b/src/com/cyanogenmod/trebuchet/Workspace.java
@@ -663,6 +663,11 @@ public class Workspace extends SmoothPagedView
final CellLayout layout;
if (container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
+ // Note: We do this to ensure that the hotseat is always laid out in the orientation
+ // of the hotseat in order regardless of which orientation they were added
+ y = mLauncher.getHotseat().getCellYFromOrder(x);
+ x = mLauncher.getHotseat().getCellXFromOrder(x);
+ screen = mLauncher.getHotseat().getScreenFromOrder(screen);
if (screen < 0 || screen >= mLauncher.getHotseat().getChildCount()) {
layout = (CellLayout) mLauncher.getHotseat().getLayout();
} else {
@@ -676,11 +681,6 @@ public class Workspace extends SmoothPagedView
} else if (child instanceof BubbleTextView) {
((BubbleTextView) child).setTextVisible(false);
}
-
- // Note: We do this to ensure that the hotseat is always laid out in the orientation
- // of the hotseat in order regardless of which orientation they were added
- y = mLauncher.getHotseat().getCellYFromOrder(x);
- x = mLauncher.getHotseat().getCellXFromOrder(x);
} else {
if (!mHideIconLabels) {
// Show titles if not in the hotseat