summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Launcher.java
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2011-01-26 16:13:55 -0800
committerMichael Jurka <mikejurka@google.com>2011-01-26 16:13:55 -0800
commite90cd23338ac6aedde27559ddb1c4113d0bba901 (patch)
treec4f194a196db929fe9900c88191228565ad861c4 /src/com/android/launcher2/Launcher.java
parent10853b92cfe9334099c56993a53c3b9bbe299a4a (diff)
downloadandroid_packages_apps_Trebuchet-e90cd23338ac6aedde27559ddb1c4113d0bba901.tar.gz
android_packages_apps_Trebuchet-e90cd23338ac6aedde27559ddb1c4113d0bba901.tar.bz2
android_packages_apps_Trebuchet-e90cd23338ac6aedde27559ddb1c4113d0bba901.zip
reduce number of animations on state changes
Diffstat (limited to 'src/com/android/launcher2/Launcher.java')
-rw-r--r--src/com/android/launcher2/Launcher.java26
1 files changed, 5 insertions, 21 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 966f2e720..861486595 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -2598,42 +2598,26 @@ public final class Launcher extends Activity
* @param hideSeq AnimatorSet in which to put "hide" animations, or null.
*/
private void hideAndShowToolbarButtons(State newState, AnimatorSet showSeq, AnimatorSet hideSeq) {
- final View searchButton = findViewById(R.id.search_button);
- final View searchDivider = findViewById(R.id.search_divider);
- final View voiceSearchButton = findViewById(R.id.voice_button);
+ final View buttonCluster = findViewById(R.id.all_apps_button_cluster);
+
final View allAppsButton = findViewById(R.id.all_apps_button);
final View divider = findViewById(R.id.divider);
final View configureButton = findViewById(R.id.configure_button);
switch (newState) {
case WORKSPACE:
- hideOrShowToolbarButton(true, searchButton, showSeq);
- hideOrShowToolbarButton(true, searchDivider, showSeq);
- hideOrShowToolbarButton(true, voiceSearchButton, showSeq);
- hideOrShowToolbarButton(true, allAppsButton, showSeq);
- hideOrShowToolbarButton(true, divider, showSeq);
- hideOrShowToolbarButton(true, configureButton, showSeq);
+ hideOrShowToolbarButton(true, buttonCluster, showSeq);
mDeleteZone.setOverlappingViews(new View[] { allAppsButton, divider, configureButton });
mDeleteZone.setDragAndDropEnabled(true);
mDeleteZone.setText(getResources().getString(R.string.delete_zone_label_workspace));
break;
case ALL_APPS:
- hideOrShowToolbarButton(false, configureButton, hideSeq);
- hideOrShowToolbarButton(false, searchDivider, hideSeq);
- hideOrShowToolbarButton(false, searchButton, hideSeq);
- hideOrShowToolbarButton(false, voiceSearchButton, hideSeq);
- hideOrShowToolbarButton(false, divider, hideSeq);
- hideOrShowToolbarButton(false, allAppsButton, hideSeq);
+ hideOrShowToolbarButton(false, buttonCluster, hideSeq);
mDeleteZone.setDragAndDropEnabled(false);
mDeleteZone.setText(getResources().getString(R.string.delete_zone_label_all_apps));
break;
case CUSTOMIZE:
- hideOrShowToolbarButton(false, allAppsButton, hideSeq);
- hideOrShowToolbarButton(false, searchDivider, hideSeq);
- hideOrShowToolbarButton(false, searchButton, hideSeq);
- hideOrShowToolbarButton(false, voiceSearchButton, hideSeq);
- hideOrShowToolbarButton(false, divider, hideSeq);
- hideOrShowToolbarButton(false, configureButton, hideSeq);
+ hideOrShowToolbarButton(false, buttonCluster, hideSeq);
mDeleteZone.setDragAndDropEnabled(false);
break;
}