summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornebkat <nebkat@teamhacksung.org>2012-12-24 13:46:02 +0000
committernebkat <nebkat@teamhacksung.org>2012-12-24 13:46:02 +0000
commit53b9dc7f0ff23e926ab9a2ff2f79d9291d36a53e (patch)
tree0ea463d20d5bff85417978d6f21e00cec6e4c52e /src
parentfb97fd60f68813553c68e7316a01c7c56726d12a (diff)
downloadandroid_packages_apps_Trebuchet-53b9dc7f0ff23e926ab9a2ff2f79d9291d36a53e.tar.gz
android_packages_apps_Trebuchet-53b9dc7f0ff23e926ab9a2ff2f79d9291d36a53e.tar.bz2
android_packages_apps_Trebuchet-53b9dc7f0ff23e926ab9a2ff2f79d9291d36a53e.zip
Hotseat: Lanscape layout fixes
Change-Id: I160e16e5d56e9722e210f3f3e9cf4413493c78a8
Diffstat (limited to 'src')
-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 e6fe065a0..600c254d8 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 7c30386d9..fa0c9ecce 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