Merge branch 'heads/android-14.0.0_r18' into 14-dev

This commit is contained in:
MrSluffy
2023-12-14 15:26:43 +08:00
parent 32700b0100
commit cc8f9828ab
756 changed files with 23785 additions and 12235 deletions
@@ -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);
}
}
}