diff options
author | Winson Chung <winsonc@google.com> | 2011-08-08 10:55:42 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2011-08-08 14:05:51 -0700 |
commit | f30ad5f1bf33baceeca6b770464fb543b58af985 (patch) | |
tree | 741c861273bee250f6773b8b29d77191ac04b1c3 /src/com/android/launcher2/Hotseat.java | |
parent | c29c8462b1f56558a4e357975fa7463e66bce47e (diff) | |
download | android_packages_apps_Trebuchet-f30ad5f1bf33baceeca6b770464fb543b58af985.tar.gz android_packages_apps_Trebuchet-f30ad5f1bf33baceeca6b770464fb543b58af985.tar.bz2 android_packages_apps_Trebuchet-f30ad5f1bf33baceeca6b770464fb543b58af985.zip |
Making hotseat a fiver.
Change-Id: I18737692a115f8fd77c6feb3062f4bfeca3506ae
Diffstat (limited to 'src/com/android/launcher2/Hotseat.java')
-rw-r--r-- | src/com/android/launcher2/Hotseat.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/launcher2/Hotseat.java b/src/com/android/launcher2/Hotseat.java index 491691eb0..c53a74377 100644 --- a/src/com/android/launcher2/Hotseat.java +++ b/src/com/android/launcher2/Hotseat.java @@ -27,7 +27,8 @@ import android.widget.FrameLayout; import com.android.launcher.R; public class Hotseat extends FrameLayout { - static final String TAG = "Hotseat"; + private static final String TAG = "Hotseat"; + private static final int sAllAppsButtonRank = 2; // In the middle of the dock private Launcher mLauncher; private CellLayout mContent; @@ -75,6 +76,9 @@ public class Hotseat extends FrameLayout { int getCellYFromOrder(int rank) { return mIsLandscape ? (mContent.getCountY() - (rank + 1)) : 0; } + public static boolean isAllAppsButtonRank(int rank) { + return rank == sAllAppsButtonRank; + } @Override protected void onFinishInflate() { @@ -110,8 +114,8 @@ public class Hotseat extends FrameLayout { // 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 - int x = getCellXFromOrder(0); - int y = getCellYFromOrder(0); + int x = getCellXFromOrder(sAllAppsButtonRank); + int y = getCellYFromOrder(sAllAppsButtonRank); mContent.addViewToCellLayout(allAppsButton, -1, 0, new CellLayout.LayoutParams(x,y,1,1), true); } |