Share via


Drawable.OnLevelChange(Int32) Method

Definition

Override this in your subclass to change appearance if you vary based on level.

[Android.Runtime.Register("onLevelChange", "(I)Z", "GetOnLevelChange_IHandler")]
protected virtual bool OnLevelChange (int level);
[<Android.Runtime.Register("onLevelChange", "(I)Z", "GetOnLevelChange_IHandler")>]
abstract member OnLevelChange : int -> bool
override this.OnLevelChange : int -> bool

Parameters

level
Int32

Returns

Returns true if the level change has caused the appearance of the Drawable to change (that is, it needs to be drawn), else false if it looks the same and there is no need to redraw it since its last level.

Attributes

Remarks

Override this in your subclass to change appearance if you vary based on level.

Java documentation for android.graphics.drawable.Drawable.onLevelChange(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