Android Guides | Samples

Android.Graphics.Drawables.Drawable.SetLevel Method

Specify the level for the drawable.


[Android.Runtime.Register("setLevel", "(I)Z", "")]
public Boolean SetLevel (Int32 level)


The new level, from 0 (minimum) to 10000 (maximum).


Specify the level for the drawable. This allows a drawable to vary its imagery based on a continuous controller, for example to show progress or volume level.

If the new level you are supplying causes the appearance of the Drawable to change, then it is responsible for calling Drawable.InvalidateSelf in order to have itself redrawn, and true will be returned from this function.

[Android Documentation]


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