Dela via


WindowInsetsAnimation.Fraction Property

Definition

Returns the raw fractional progress of this animation between start state of the animation and the end state of the animation. -or- Set fraction of the progress if WindowInsets.Type animation is controlled by the app.

public float Fraction { [Android.Runtime.Register("getFraction", "()F", "", ApiSince=30)] get; [Android.Runtime.Register("setFraction", "(F)V", "", ApiSince=30)] set; }
[<get: Android.Runtime.Register("getFraction", "()F", "", ApiSince=30)>]
[<set: Android.Runtime.Register("setFraction", "(F)V", "", ApiSince=30)>]
member this.Fraction : single with get, set

Property Value

The current progress of this animation.

Attributes

Remarks

Property getter documentation:

Returns the raw fractional progress of this animation between start state of the animation and the end state of the animation. Note that this progress is the global progress of the animation, whereas Callback#onProgress will only dispatch the insets that may be inset with WindowInsets#inset by parents of views in the hierarchy. Progress per insets animation is global for the entire animation. One animation animates all things together (in, out, ...). If they don't animate together, we'd have multiple animations.

Note: In case the application is controlling the animation, the valued returned here will be the same as the application passed into WindowInsetsAnimationController#setInsetsAndAlpha(Insets, float, float).

Java documentation for android.view.WindowInsetsAnimation.getFraction().

Property setter documentation:

Set fraction of the progress if WindowInsets.Type animation is controlled by the app.

Note: This should only be used for testing, as the system fills in the fraction for the application or the fraction that was passed into WindowInsetsAnimationController#setInsetsAndAlpha(Insets, float, float) is being used.

Java documentation for android.view.WindowInsetsAnimation.setFraction(float).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to