Android Guides | Samples

Android.Graphics.Drawables.LayerDrawable.SetOpacity Method

Sets the opacity of this drawable directly instead of collecting the states from the layers.

Syntax

[Android.Runtime.Register("setOpacity", "(I)V", "GetSetOpacity_IHandler")]
public virtual Void SetOpacity (Int32 opacity)

Parameters

opacity
The opacity to use, or Format.Unknown for the default behavior

Remarks

Sets the opacity of this drawable directly instead of collecting the states from the layers.

[Android Documentation]

Requirements

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