Apply icon alpha animation to expand/collapse private space.
This change is more so to the Alt 3 motion spec: https://docs.google.com/presentation/d/1zRwJ8cZbwMleXHfC2hX4CJJMGSI954FK0V3ksXl7fyE/edit#slide=id.g2baced0bfd0_1_25 bug: 299294792 bug: 325455879 Test: locally: https://screenshot.googleplex.com/BYCwSH3yRvkkZ3v and https://screenshot.googleplex.com/44byrRx5GUQkncw manual video: expand and collapse from header: https://drive.google.com/file/d/1-qRdcbo6lNvUPOx4QWL6wVhTRzl2TVtE/view?usp=sharing from toast and close container after locking: https://drive.google.com/file/d/1-ix4CcOIzMhsJH3uZdJA1vcV8BvY91T9/view?usp=sharing Flag: ACONFIG com.android.launcher3.Flags.private_space_animation TRUNKFOOD Change-Id: I4cde4b8626cf3271880fee697f2fb6bc780eab60
This commit is contained in:
1 parent
520d91f93b
commit
5cbe7605f6
5 files changed
+162
-65
No files matched your search
@@ -21,6 +21,7 @@ import static com.android.launcher3.allapps.SectionDecorationInfo.ROUND_NOTHING;
|
||||
import static com.android.launcher3.allapps.SectionDecorationInfo.ROUND_TOP_LEFT;
|
||||
import static com.android.launcher3.allapps.SectionDecorationInfo.ROUND_TOP_RIGHT;
|
||||
import static com.android.launcher3.allapps.UserProfileManager.STATE_DISABLED;
|
||||
import static com.android.launcher3.allapps.UserProfileManager.STATE_ENABLED;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -40,7 +41,6 @@ import com.android.launcher3.Flags;
|
||||
import com.android.launcher3.LauncherPrefs;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.allapps.search.SearchAdapterProvider;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.model.data.AppInfo;
|
||||
import com.android.launcher3.views.ActivityContext;
|
||||
|
||||
@@ -262,6 +262,17 @@ public abstract class BaseAllAppsAdapter<T extends Context & ActivityContext> ex
|
||||
icon.reset();
|
||||
icon.applyFromApplicationInfo(adapterItem.itemInfo);
|
||||
icon.setOnFocusChangeListener(mIconFocusListener);
|
||||
PrivateProfileManager privateProfileManager = mApps.getPrivateProfileManager();
|
||||
// Set the alpha of the private space icon to 0 upon expanding the header so the
|
||||
// alpha can animate -> 1.
|
||||
if (icon.getAlpha() == 0 || icon.getAlpha() == 1) {
|
||||
icon.setAlpha(privateProfileManager != null
|
||||
&& privateProfileManager.isPrivateSpaceItem(adapterItem)
|
||||
&& privateProfileManager.getAnimationScrolling()
|
||||
&& privateProfileManager.getAnimate()
|
||||
&& privateProfileManager.getCurrentState() == STATE_ENABLED
|
||||
? 0 : 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VIEW_TYPE_EMPTY_SEARCH: {
|
||||
|
||||
Reference in new issue
Block a user