Sdílet prostřednictvím


View.OnSetAlpha(Int32) Method

Definition

Invoked if there is a Transform that involves alpha.

[Android.Runtime.Register("onSetAlpha", "(I)Z", "GetOnSetAlpha_IHandler")]
protected virtual bool OnSetAlpha (int alpha);
[<Android.Runtime.Register("onSetAlpha", "(I)Z", "GetOnSetAlpha_IHandler")>]
abstract member OnSetAlpha : int -> bool
override this.OnSetAlpha : int -> bool

Parameters

alpha
Int32

The alpha (0..255) to apply to the view's drawing

Returns

true if the view can draw with the specified alpha.

Attributes

Remarks

Invoked if there is a Transform that involves alpha. Subclass that can draw themselves with the specified alpha should return true, and then respect that alpha when their onDraw() is called. If this returns false then the view may be redirected to draw into an offscreen buffer to fulfill the request, which will look fine, but may be slower than if the subclass handles it internally. The default implementation returns false.

Java documentation for android.view.View.onSetAlpha(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