summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/trebuchet/Launcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/cyanogenmod/trebuchet/Launcher.java')
-rw-r--r--src/com/cyanogenmod/trebuchet/Launcher.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Launcher.java b/src/com/cyanogenmod/trebuchet/Launcher.java
index 0a137dafc..033eaf139 100644
--- a/src/com/cyanogenmod/trebuchet/Launcher.java
+++ b/src/com/cyanogenmod/trebuchet/Launcher.java
@@ -1737,6 +1737,7 @@ public final class Launcher extends Activity
public void onLongClickAppsTab(View v) {
final PopupMenu popupMenu = new PopupMenu(this, v);
final Menu menu = popupMenu.getMenu();
+ dismissAllAppsSortCling(null);
popupMenu.inflate(R.menu.apps_tab);
AppsCustomizePagedView.SortMode sortMode = mAppsCustomizeContent.getSortMode();
if (sortMode == AppsCustomizePagedView.SortMode.Title) {
@@ -3250,6 +3251,7 @@ public final class Launcher extends Activity
}
private void dismissCling(final Cling cling, final String flag, int duration) {
if (cling != null) {
+ cling.dismiss();
ObjectAnimator anim = ObjectAnimator.ofFloat(cling, "alpha", 0f);
anim.setDuration(duration);
anim.addListener(new AnimatorListenerAdapter() {
@@ -3298,6 +3300,16 @@ public final class Launcher extends Activity
removeCling(R.id.all_apps_cling);
}
}
+ public void showFirstRunAllAppsSortCling() {
+ // Enable the clings only if they have not been dismissed before
+ SharedPreferences prefs =
+ getSharedPreferences(PreferencesProvider.PREFERENCES_KEY, Context.MODE_PRIVATE);
+ if (isClingsEnabled() && !prefs.getBoolean(Cling.ALLAPPS_SORT_CLING_DISMISSED_KEY, false)) {
+ initCling(R.id.all_apps_sort_cling, null, true, 0);
+ } else {
+ removeCling(R.id.all_apps_sort_cling);
+ }
+ }
public Cling showFirstRunFoldersCling() {
// Enable the clings only if they have not been dismissed before
SharedPreferences prefs =
@@ -3325,6 +3337,10 @@ public final class Launcher extends Activity
Cling cling = (Cling) findViewById(R.id.all_apps_cling);
dismissCling(cling, Cling.ALLAPPS_CLING_DISMISSED_KEY, DISMISS_CLING_DURATION);
}
+ public void dismissAllAppsSortCling(View v) {
+ Cling cling = (Cling) findViewById(R.id.all_apps_sort_cling);
+ dismissCling(cling, Cling.ALLAPPS_SORT_CLING_DISMISSED_KEY, DISMISS_CLING_DURATION);
+ }
public void dismissFolderCling(View v) {
Cling cling = (Cling) findViewById(R.id.folder_cling);
dismissCling(cling, Cling.FOLDER_CLING_DISMISSED_KEY, DISMISS_CLING_DURATION);