Merge "Removing the Folders tab."
diff --git a/src/com/android/launcher2/AllAppsPagedView.java b/src/com/android/launcher2/AllAppsPagedView.java
index 5de53d8..54343cf 100644
--- a/src/com/android/launcher2/AllAppsPagedView.java
+++ b/src/com/android/launcher2/AllAppsPagedView.java
@@ -430,9 +430,6 @@
TextView icon = (TextView) mInflater.inflate(
R.layout.all_apps_no_items_placeholder, layout, false);
switch (mAppFilter) {
- case ApplicationInfo.GAME_FLAG:
- icon.setText(mContext.getString(R.string.all_apps_no_games));
- break;
case ApplicationInfo.DOWNLOADED_FLAG:
icon.setText(mContext.getString(R.string.all_apps_no_downloads));
break;
@@ -484,15 +481,18 @@
@Override
public void onDestroyActionMode(ActionMode mode) {
+ final Menu menu = mode.getMenu();
+
// Re-parent the drop targets into the toolbar, and restore their layout params
+
ApplicationInfoDropTarget infoButton =
- (ApplicationInfoDropTarget) mLauncher.findViewById(R.id.info_button);
+ (ApplicationInfoDropTarget) menu.findItem(MENU_APP_INFO).getActionView();
((ViewGroup) infoButton.getParent()).removeView(infoButton);
mOrigInfoButtonParent.addView(infoButton, mOrigInfoButtonLayoutParams);
infoButton.setVisibility(View.GONE);
infoButton.setManageVisibility(true);
- DeleteZone deleteZone = (DeleteZone) mLauncher.findViewById(R.id.delete_zone);
+ DeleteZone deleteZone = (DeleteZone) menu.findItem(MENU_DELETE_APP).getActionView();
((ViewGroup) deleteZone.getParent()).removeView(deleteZone);
mOrigDeleteZoneParent.addView(deleteZone, mOrigDeleteZoneLayoutParams);
deleteZone.setVisibility(View.GONE);
diff --git a/src/com/android/launcher2/AllAppsTabbed.java b/src/com/android/launcher2/AllAppsTabbed.java
index ac6484d..eaeb80f 100644
--- a/src/com/android/launcher2/AllAppsTabbed.java
+++ b/src/com/android/launcher2/AllAppsTabbed.java
@@ -39,8 +39,6 @@
private static final String TAG = "Launcher.AllAppsTabbed";
private static final String TAG_ALL = "ALL";
- private static final String TAG_APPS = "APPS";
- private static final String TAG_GAMES = "GAMES";
private static final String TAG_DOWNLOADED = "DOWNLOADED";
private AllAppsPagedView mAllApps;
@@ -73,12 +71,6 @@
String label = mContext.getString(R.string.all_apps_tab_all);
addTab(newTabSpec(TAG_ALL).setIndicator(label).setContent(contentFactory));
- label = mContext.getString(R.string.all_apps_tab_apps);
- addTab(newTabSpec(TAG_APPS).setIndicator(label).setContent(contentFactory));
-
- label = mContext.getString(R.string.all_apps_tab_games);
- addTab(newTabSpec(TAG_GAMES).setIndicator(label).setContent(contentFactory));
-
label = mContext.getString(R.string.all_apps_tab_downloaded);
addTab(newTabSpec(TAG_DOWNLOADED).setIndicator(label).setContent(contentFactory));
@@ -95,10 +87,6 @@
String tag = getCurrentTabTag();
if (tag == TAG_ALL) {
mAllApps.setAppFilter(AllAppsPagedView.ALL_APPS_FLAG);
- } else if (tag == TAG_APPS) {
- mAllApps.setAppFilter(ApplicationInfo.APP_FLAG);
- } else if (tag == TAG_GAMES) {
- mAllApps.setAppFilter(ApplicationInfo.GAME_FLAG);
} else if (tag == TAG_DOWNLOADED) {
mAllApps.setAppFilter(ApplicationInfo.DOWNLOADED_FLAG);
}
diff --git a/src/com/android/launcher2/ApplicationInfoDropTarget.java b/src/com/android/launcher2/ApplicationInfoDropTarget.java
index fe5ffd1..3e5ebd5 100644
--- a/src/com/android/launcher2/ApplicationInfoDropTarget.java
+++ b/src/com/android/launcher2/ApplicationInfoDropTarget.java
@@ -118,10 +118,10 @@
public void onDragEnd() {
if (mActive) {
mActive = false;
- if (mManageVisibility) {
- setVisibility(GONE);
- mHandle.setVisibility(VISIBLE);
- }
+ }
+ if (mManageVisibility) {
+ setVisibility(GONE);
+ mHandle.setVisibility(VISIBLE);
}
}