diff options
author | Michael Jurka <mikejurka@google.com> | 2011-01-26 16:13:55 -0800 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2011-01-26 16:13:55 -0800 |
commit | e90cd23338ac6aedde27559ddb1c4113d0bba901 (patch) | |
tree | c4f194a196db929fe9900c88191228565ad861c4 /src/com/android | |
parent | 10853b92cfe9334099c56993a53c3b9bbe299a4a (diff) | |
download | packages_apps_trebuchet-e90cd23338ac6aedde27559ddb1c4113d0bba901.zip packages_apps_trebuchet-e90cd23338ac6aedde27559ddb1c4113d0bba901.tar.gz packages_apps_trebuchet-e90cd23338ac6aedde27559ddb1c4113d0bba901.tar.bz2 |
reduce number of animations on state changes
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/launcher2/Launcher.java | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 966f2e7..8614865 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; } |