Revert "Revert "Make AllAppsRecyclerViewContainer GONE when hidden""

This reverts commit a163646c7a.

Reason for revert: Re-submit with ENABLE_ALL_APPS_RV_PREINFLATION and ALL_APPS_GONE_VISIBILITY turned off in child CL (submit together)

Test: Tested in ag/24107285
Change-Id: Ia85c1e8447c45ff44814ad4bfe0f178a72d0e7d3
This commit is contained in:
Fengjiang Li committed 2023-08-04 10:28:36 -07:00
1 parent 40a44e08b9
commit 98c91a65cf
7 files changed
+96 -25

No files matched your search

@@ -32,8 +32,15 @@ public class MultiValueAlpha extends MultiPropertyFactory<View> {
// Whether we should change from INVISIBLE to VISIBLE and vice versa at low alpha values.
private boolean mUpdateVisibility;
private final int mHiddenVisibility;
public MultiValueAlpha(View view, int size) {
this(view, size, View.INVISIBLE);
}
public MultiValueAlpha(View view, int size, int hiddenVisibility) {
super(view, VIEW_ALPHA, size, ALPHA_AGGREGATOR, 1f);
this.mHiddenVisibility = hiddenVisibility;
}
/** Sets whether we should update between INVISIBLE and VISIBLE based on alpha. */
@@ -45,7 +52,7 @@ public class MultiValueAlpha extends MultiPropertyFactory<View> {
protected void apply(float value) {
super.apply(value);
if (mUpdateVisibility) {
AlphaUpdateListener.updateVisibility(mTarget);
AlphaUpdateListener.updateVisibility(mTarget, mHiddenVisibility);
}
}
}