Udostępnij za pośrednictwem


ShapeDrawable.SetAlpha(Int32) Method

Definition

Set the alpha level for this drawable [0.

[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
Attributes

Remarks

Set the alpha level for this drawable [0..255]. Note that this drawable also has a color in its paint, which has an alpha as well. These two values are automatically combined during drawing. Thus if the color's alpha is 75% (i.e. 192) and the drawable's alpha is 50% (i.e. 128), then the combined alpha that will be used during drawing will be 37.5% (i.e. 96).

Java documentation for android.graphics.drawable.ShapeDrawable.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