Android.Views.ViewPropertyAnimator.WithLayer Method
The View associated with this ViewPropertyAnimator will have its View.SetLayerType(LayerType, Android.Graphics.Paint) set to View.LAYER_TYPE_HARDWARE for the duration of the next animation.

Syntax

[Android.Runtime.Register("withLayer", "()Landroid/view/ViewPropertyAnimator;", "GetWithLayerHandler")]
public virtual ViewPropertyAnimator WithLayer ()

See Also

View.SetLayerType(LayerType, Android.Graphics.Paint)

Returns

Documentation for this section has not yet been entered.

Remarks

The View associated with this ViewPropertyAnimator will have its View.SetLayerType(LayerType, Android.Graphics.Paint) set to View.LAYER_TYPE_HARDWARE for the duration of the next animation. As stated in the documentation for View.LAYER_TYPE_HARDWARE, the actual type of layer used internally depends on the runtime situation of the view. If the activity and this view are hardware-accelerated, then the layer will be accelerated as well. If the activity or the view is not accelerated, then the layer will effectively be the same as View.LAYER_TYPE_SOFTWARE.

This state is not persistent, either on the View or on this ViewPropertyAnimator: the layer type of the View will be restored when the animation ends to what it was when this method was called, and this setting on ViewPropertyAnimator is only valid for the next animation. Note that calling this method and then independently setting the layer type of the View (by a direct call to View.SetLayerType(LayerType, Android.Graphics.Paint)) will result in some inconsistency, including having the layer type restored to its pre-withLayer() value when the animation ends.

[Android Documentation]

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 16