summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/trebuchet/Hotseat.java
diff options
context:
space:
mode:
authornebkat <nebkat@teamhacksung.org>2012-12-23 14:25:45 +0000
committernebkat <nebkat@teamhacksung.org>2012-12-24 10:04:49 +0000
commitfff81cad6963dfa977fa8063efa3d29797d9d8c2 (patch)
treee43abf973d2bdbccf2778df871a554464f5aabc2 /src/com/cyanogenmod/trebuchet/Hotseat.java
parent10a908a32cab20d5fc0ee944a3b34b98a9648f68 (diff)
downloadpackages_apps_trebuchet-fff81cad6963dfa977fa8063efa3d29797d9d8c2.zip
packages_apps_trebuchet-fff81cad6963dfa977fa8063efa3d29797d9d8c2.tar.gz
packages_apps_trebuchet-fff81cad6963dfa977fa8063efa3d29797d9d8c2.tar.bz2
Launcher actions
Change-Id: Ica0699f99d68b9f89d6f103eaadc56e632d87101
Diffstat (limited to 'src/com/cyanogenmod/trebuchet/Hotseat.java')
-rw-r--r--src/com/cyanogenmod/trebuchet/Hotseat.java42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Hotseat.java b/src/com/cyanogenmod/trebuchet/Hotseat.java
index 10a7623..cc287bd 100644
--- a/src/com/cyanogenmod/trebuchet/Hotseat.java
+++ b/src/com/cyanogenmod/trebuchet/Hotseat.java
@@ -29,9 +29,6 @@ import android.widget.FrameLayout;
import com.cyanogenmod.trebuchet.R;
public class Hotseat extends FrameLayout {
- @SuppressWarnings("unused")
- private static final String TAG = "Trebuchet.Hotseat";
-
private Launcher mLauncher;
private CellLayout mContent;
@@ -92,9 +89,6 @@ public class Hotseat extends FrameLayout {
int getCellYFromOrder(int rank) {
return hasVerticalHotseat() ? (mContent.getCountY() - (rank + 1)) : 0;
}
- public boolean isAllAppsButtonRank(int rank) {
- return rank == mAllAppsButtonRank;
- }
@Override
protected void onFinishInflate() {
@@ -110,41 +104,5 @@ public class Hotseat extends FrameLayout {
void resetLayout() {
mContent.removeAllViewsInLayout();
-
- // Add the Apps button
- Context context = getContext();
- LayoutInflater inflater = LayoutInflater.from(context);
- BubbleTextView allAppsButton = (BubbleTextView)
- inflater.inflate(R.layout.application, mContent, false);
- allAppsButton.setCompoundDrawablesWithIntrinsicBounds(null,
- context.getResources().getDrawable(R.drawable.all_apps_button_icon), null, null);
- allAppsButton.setContentDescription(context.getString(R.string.all_apps_button_label));
- allAppsButton.setOnTouchListener(new View.OnTouchListener() {
- @Override
- public boolean onTouch(View v, MotionEvent event) {
- if (mLauncher != null &&
- (event.getAction() & MotionEvent.ACTION_MASK) == MotionEvent.ACTION_DOWN) {
- mLauncher.onTouchDownAllAppsButton(v);
- }
- return false;
- }
- });
-
- 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);
}
}