Share via


ColorDrawable.SetAlpha(Int32) Method

Definition

Applies the given alpha to the underlying color.

[Android.Runtime.Register("setAlpha", "(I)V", "GetSetAlpha_IHandler")]
public override void SetAlpha (int alpha);
[<Android.Runtime.Register("setAlpha", "(I)V", "GetSetAlpha_IHandler")>]
override this.SetAlpha : int -> unit

Parameters

alpha
Int32

The alpha value to set, between 0 and 255.

Attributes

Remarks

Applies the given alpha to the underlying color. Note if the color already has an alpha applied to it, this will apply this alpha to the existing value instead of overwriting it.

Java documentation for android.graphics.drawable.ColorDrawable.setAlpha(int).

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