Android

android.graphics.drawable.LevelListDrawable

java.lang.Object
android.graphics.drawable.Drawable
android.graphics.drawable.DrawableContainer Drawable.Callback
android.graphics.drawable.LevelListDrawable

A resource that contains a number of alternate images, each assigned a maximum numerical value. Setting the level value of the object with setLevel(int) will load the image with the next greater or equal value assigned to its max attribute. See Level List in the Resources topic to learn how to specify this type as an XML resource. A good example use of a LevelListDrawable would be a battery level indicator icon, with different images to indicate the current battery level.

Summary

Public Constructors

            LevelListDrawable()

Public Methods

          void  addLevel(int low, int high, Drawable drawable)
          void  inflate(Resources r, XmlPullParser parser, AttributeSet attrs)

Protected Methods

          boolean  onLevelChange(int level)
Override this in your subclass to change appearance if you vary based on level.
Methods inherited from class android.graphics.drawable.DrawableContainer
Methods inherited from class android.graphics.drawable.Drawable
Methods inherited from class java.lang.Object
Methods inherited from interface android.graphics.drawable.Drawable.Callback

Details

Public Constructors

public LevelListDrawable()

Public Methods

public void addLevel(int low, int high, Drawable drawable)

public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs)

Throws

XmlPullParserException
IOException

Protected Methods

protected boolean onLevelChange(int level)

Override this in your subclass to change appearance if you vary based on level.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56