diff options
author | Nebojsa Cvetkovic <nebkat@gmail.com> | 2014-01-01 16:22:41 +0000 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2014-01-24 16:25:19 -0800 |
commit | 9f0e132f8f21c7de6df3f1e8f1500f594557bd9c (patch) | |
tree | 8ef1e2053ada059ad74ec32905e980da5a5b9c7c /src/com/android/launcher3/Hotseat.java | |
parent | 9bbb6cf6d78824d4c68382f33b654c43f4aaa109 (diff) | |
download | android_packages_apps_Trebuchet-9f0e132f8f21c7de6df3f1e8f1500f594557bd9c.tar.gz android_packages_apps_Trebuchet-9f0e132f8f21c7de6df3f1e8f1500f594557bd9c.tar.bz2 android_packages_apps_Trebuchet-9f0e132f8f21c7de6df3f1e8f1500f594557bd9c.zip |
Hotseat: Movable AllApps button
Change-Id: I4273c460392c8329368a23ef6f0d9698f52adfea
Diffstat (limited to 'src/com/android/launcher3/Hotseat.java')
-rw-r--r-- | src/com/android/launcher3/Hotseat.java | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java index c88cd1da5..2812b4129 100644 --- a/src/com/android/launcher3/Hotseat.java +++ b/src/com/android/launcher3/Hotseat.java @@ -94,13 +94,6 @@ public class Hotseat extends FrameLayout { int getCellYFromOrder(int rank) { return hasVerticalHotseat() ? (mContent.getCountY() - (rank + 1)) : 0; } - public boolean isAllAppsButtonRank(int rank) { - if (AppsCustomizePagedView.DISABLE_ALL_APPS) { - return false; - } else { - return rank == mAllAppsButtonRank; - } - } /** This returns the coordinates of an app in a given cell, relative to the DragLayer */ Rect getCellCoordinates(int cellX, int cellY) { @@ -141,40 +134,6 @@ public class Hotseat extends FrameLayout { void resetLayout() { mContent.removeAllViewsInLayout(); - - if (!AppsCustomizePagedView.DISABLE_ALL_APPS) { - // Add the Apps button - Context context = getContext(); - - LayoutInflater inflater = LayoutInflater.from(context); - TextView allAppsButton = (TextView) - inflater.inflate(R.layout.all_apps_button, mContent, false); - Drawable d = context.getResources().getDrawable(R.drawable.all_apps_button_icon); - Utilities.resizeIconDrawable(d); - Utilities.applyTypeface(allAppsButton); - allAppsButton.setCompoundDrawables(null, d, null, null); - - allAppsButton.setContentDescription(context.getString(R.string.all_apps_button_label)); - if (mLauncher != null) { - allAppsButton.setOnTouchListener(mLauncher.getHapticFeedbackTouchListener()); - } - allAppsButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(android.view.View v) { - if (mLauncher != null) { - mLauncher.onClickAllAppsButton(v); - } - } - }); - - // 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(mAllAppsButtonRank); - int y = getCellYFromOrder(mAllAppsButtonRank); - CellLayout.LayoutParams lp = new CellLayout.LayoutParams(x,y,1,1); - lp.canReorder = false; - mContent.addViewToCellLayout(allAppsButton, -1, 0, lp, true); - } } @Override |