|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectImageButton
org.hermit.android.widgets.MultistateImageButton
public class MultistateImageButton
This class displays an image button which toggles or cycles through multiple states when clicked.
Constructor Summary | |
---|---|
MultistateImageButton(Context context,
AttributeSet attrs,
int[] images)
Create a multistate image button with a specified set of image resource IDs. |
|
MultistateImageButton(Context context,
int[] images)
Create a multistate image button with a specified set of image resource IDs. |
Method Summary | |
---|---|
int |
getState()
Get the current state of this button. |
void |
setOnClickListener(OnClickListener l)
Register a callback to be invoked when this view is clicked. |
void |
setState(int s)
Set the current state of this button. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultistateImageButton(Context context, int[] images)
context
- Parent application.images
- Resource IDs of the images to use for each
state.public MultistateImageButton(Context context, AttributeSet attrs, int[] images)
context
- Parent application.attrs
- Layout attributes.images
- Resource IDs of the images to use for each
state.Method Detail |
---|
public void setOnClickListener(OnClickListener l)
l
- The callback that will run.public int getState()
public void setState(int s)
s
- State to set, as an index into the list of images.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |