diff options
author | Adam Cohen <adamcohen@google.com> | 2013-10-11 13:53:22 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-11 13:53:22 -0700 |
commit | b8a0fe4e059c65375f95be8d44b797727764e63d (patch) | |
tree | b015657de8a7a4377afb9f2d4638c01e23756cbd | |
parent | 917782642a7e01077b5994fa99edeff463c1b8b0 (diff) | |
parent | a5f4e488dff461fbbc61400a8d284d9886164f76 (diff) | |
download | android_packages_apps_Trebuchet-b8a0fe4e059c65375f95be8d44b797727764e63d.tar.gz android_packages_apps_Trebuchet-b8a0fe4e059c65375f95be8d44b797727764e63d.tar.bz2 android_packages_apps_Trebuchet-b8a0fe4e059c65375f95be8d44b797727764e63d.zip |
am a5f4e488: Guarantee views are invisible after being faded (issue 11112570)
* commit 'a5f4e488dff461fbbc61400a8d284d9886164f76':
Guarantee views are invisible after being faded (issue 11112570)
-rw-r--r-- | res/layout/user_folder.xml | 2 | ||||
-rw-r--r-- | src/com/android/launcher3/Hotseat.java | 11 | ||||
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 31 |
3 files changed, 37 insertions, 7 deletions
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 66d441056..cc585f253 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; @@ -2058,15 +2059,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 +2106,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 +2128,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 |