summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/drawable-hdpi/ic_allapps_pressed.pngbin10316 -> 9985 bytes
-rw-r--r--res/drawable-mdpi/ic_allapps_pressed.pngbin6257 -> 6048 bytes
-rw-r--r--res/drawable-xhdpi/ic_allapps_pressed.pngbin14198 -> 13782 bytes
-rw-r--r--res/drawable-xxhdpi/ic_allapps_pressed.pngbin17563 -> 17006 bytes
-rw-r--r--res/layout/user_folder.xml2
-rw-r--r--src/com/android/launcher3/Hotseat.java11
-rw-r--r--src/com/android/launcher3/Workspace.java56
7 files changed, 60 insertions, 9 deletions
diff --git a/res/drawable-hdpi/ic_allapps_pressed.png b/res/drawable-hdpi/ic_allapps_pressed.png
index bdc7baab7..863eebaa5 100644
--- a/res/drawable-hdpi/ic_allapps_pressed.png
+++ b/res/drawable-hdpi/ic_allapps_pressed.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_allapps_pressed.png b/res/drawable-mdpi/ic_allapps_pressed.png
index 35a96836d..3bd87b187 100644
--- a/res/drawable-mdpi/ic_allapps_pressed.png
+++ b/res/drawable-mdpi/ic_allapps_pressed.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_allapps_pressed.png b/res/drawable-xhdpi/ic_allapps_pressed.png
index 20bec4f31..d678f027e 100644
--- a/res/drawable-xhdpi/ic_allapps_pressed.png
+++ b/res/drawable-xhdpi/ic_allapps_pressed.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_allapps_pressed.png b/res/drawable-xxhdpi/ic_allapps_pressed.png
index 752070d09..77b45aefb 100644
--- a/res/drawable-xxhdpi/ic_allapps_pressed.png
+++ b/res/drawable-xxhdpi/ic_allapps_pressed.png
Binary files differ
diff --git a/res/layout/user_folder.xml b/res/layout/user_folder.xml
index d01e2ebba..5d5f33b1f 100644
--- a/res/layout/user_folder.xml
+++ b/res/layout/user_folder.xml
@@ -45,7 +45,7 @@
android:hint="@string/folder_hint_text"
android:textSize="14sp"
android:textColor="#ff777777"
- android:textColorHighlight="#ff333333"
+ android:textColorHighlight="#ffCCCCCC"
android:textCursorDrawable="@null"
android:gravity="center_horizontal"
android:singleLine="true"
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index 1f876fd6b..2aab64d73 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -25,6 +25,7 @@ import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
+import android.view.MotionEvent;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.TextView;
@@ -175,6 +176,16 @@ public class Hotseat extends FrameLayout {
}
}
+ @Override
+ public boolean onInterceptTouchEvent(MotionEvent ev) {
+ // We don't want any clicks to go through to the hotseat unless the workspace is in
+ // the normal state.
+ if (mLauncher.getWorkspace().isSmall()) {
+ return true;
+ }
+ return false;
+ }
+
void addAllAppsFolder(IconCache iconCache,
ArrayList<AppInfo> allApps, ArrayList<ComponentName> onWorkspace,
Launcher launcher, Workspace workspace) {
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index edc5fce97..688acafad 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -17,6 +17,7 @@
package com.android.launcher3;
import android.animation.Animator;
+import android.animation.Animator.AnimatorListener;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.LayoutTransition;
@@ -441,6 +442,13 @@ public class Workspace extends SmoothPagedView
setLayoutTransition(mLayoutTransition);
}
+ void enableLayoutTransitions() {
+ setLayoutTransition(mLayoutTransition);
+ }
+ void disableLayoutTransitions() {
+ setLayoutTransition(null);
+ }
+
@Override
protected int getScrollMode() {
return SmoothPagedView.X_LARGE_MODE;
@@ -488,10 +496,24 @@ public class Workspace extends SmoothPagedView
}
public void removeAllWorkspaceScreens() {
+ // Disable all layout transitions before removing all pages to ensure that we don't get the
+ // transition animations competing with us changing the scroll when we add pages or the
+ // custom content screen
+ disableLayoutTransitions();
+
+ // Since we increment the current page when we call addCustomContentPage via bindScreens
+ // (and other places), we need to adjust the current page back when we clear the pages
+ if (hasCustomContent()) {
+ removeCustomContentPage();
+ }
+
// Remove the pages and clear the screen models
removeAllViews();
mScreenOrder.clear();
mWorkspaceScreens.clear();
+
+ // Re-enable the layout transitions
+ enableLayoutTransitions();
}
public long insertNewWorkspaceScreenBeforeEmptyScreen(long screenId) {
@@ -1821,7 +1843,7 @@ public class Workspace extends SmoothPagedView
super.onStartReordering();
showOutlines();
// Reordering handles its own animations, disable the automatic ones.
- setLayoutTransition(null);
+ disableLayoutTransitions();
}
protected void onEndReordering() {
@@ -1838,7 +1860,7 @@ public class Workspace extends SmoothPagedView
mLauncher.getModel().updateWorkspaceScreenOrder(mLauncher, mScreenOrder);
// Re-enable auto layout transitions for page deletion.
- setLayoutTransition(mLayoutTransition);
+ enableLayoutTransitions();
}
public boolean isInOverviewMode() {
@@ -2058,15 +2080,14 @@ public class Workspace extends SmoothPagedView
ObjectAnimator overviewPanelAlpha = ObjectAnimator.ofFloat(overviewPanel,
"alpha", finalOverviewPanelAlpha);
- overviewPanelAlpha.addUpdateListener(new AlphaUpdateListener(overviewPanel));
- hotseatAlpha.addUpdateListener(new AlphaUpdateListener(hotseat));
- searchBarAlpha.addUpdateListener(new AlphaUpdateListener(searchBar));
+ overviewPanelAlpha.addListener(new AlphaUpdateListener(overviewPanel));
+ hotseatAlpha.addListener(new AlphaUpdateListener(hotseat));
+ searchBarAlpha.addListener(new AlphaUpdateListener(searchBar));
if (getPageIndicator() != null) {
- pageIndicatorAlpha.addUpdateListener(new AlphaUpdateListener(getPageIndicator()));
+ pageIndicatorAlpha.addListener(new AlphaUpdateListener(getPageIndicator()));
}
-
anim.play(overviewPanelAlpha);
anim.play(hotseatAlpha);
anim.play(searchBarAlpha);
@@ -2106,7 +2127,7 @@ public class Workspace extends SmoothPagedView
return anim;
}
- static class AlphaUpdateListener implements AnimatorUpdateListener {
+ static class AlphaUpdateListener implements AnimatorUpdateListener, AnimatorListener {
View view;
public AlphaUpdateListener(View v) {
view = v;
@@ -2128,6 +2149,25 @@ public class Workspace extends SmoothPagedView
view.setVisibility(VISIBLE);
}
}
+
+ @Override
+ public void onAnimationCancel(Animator arg0) {
+ }
+
+ @Override
+ public void onAnimationEnd(Animator arg0) {
+ updateVisibility(view);
+ }
+
+ @Override
+ public void onAnimationRepeat(Animator arg0) {
+ }
+
+ @Override
+ public void onAnimationStart(Animator arg0) {
+ // We want the views to be visible for animation, so fade-in/out is visible
+ view.setVisibility(VISIBLE);
+ }
}
@Override