Android.Views.View.SetLayerType Method

Syntax

[Android.Runtime.Register("setLayerType", "(ILandroid/graphics/Paint;)V", "GetSetLayerType_ILandroid_graphics_Paint_Handler")]
public virtual void SetLayerType ([Android.Runtime.GeneratedEnum] LayerType layerType, Android.Graphics.Paint paint)

See Also

View.LayerType
View.Alpha

Parameters

layerType
The type of layer to use with this view, must be one of View.LAYER_TYPE_NONE, View.LAYER_TYPE_SOFTWARE or View.LAYER_TYPE_HARDWARE
paint
The paint used to compose the layer. This argument is optional and can be null. It is ignored when the layer type is View.LAYER_TYPE_NONE

Remarks

Specifies the type of layer backing this view. The layer can be View.LAYER_TYPE_NONE, View.LAYER_TYPE_SOFTWARE or View.LAYER_TYPE_HARDWARE.

A layer is associated with an optional Android.Graphics.Paint instance that controls how the layer is composed on screen. The following properties of the paint are taken into account when composing the layer:

If this view has an alpha value set to View.Alpha, the alpha value of the layer's paint is superceded by this view's alpha value.

Refer to the documentation of View.LAYER_TYPE_NONE, View.LAYER_TYPE_SOFTWARE and View.LAYER_TYPE_HARDWARE for more information on when and how to use layers.

[Android Documentation]

Requirements

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