|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectDialog
org.hermit.android.notice.InfoBox
public class InfoBox
This class implements a popup info box (a subclass of Dialog) which can be used to display help text, about info, license info, etc.
Field Summary | |
---|---|
static int |
BUTTON_1
Select configurable button 1 -- the middle button. |
static int |
BUTTON_2
Select configurable button 2 -- the middle button. |
Constructor Summary | |
---|---|
InfoBox(Activity parent)
Create an info box with a "close" button. |
|
InfoBox(Activity parent,
int button)
Create an info box. |
Method Summary | |
---|---|
protected void |
linkButtonPressed(int which)
Called when a link button is clicked. |
protected void |
okButtonPressed()
Called when the OK button is clicked. |
void |
setLinkButton(int which,
int label,
int link)
Set a link button on this dialog. |
void |
setSubtitle(int textId)
Set the subtitle for the about box. |
void |
setSubtitle(java.lang.String text)
Set the subtitle for the about box. |
void |
show(int text)
Start the dialog and display it on screen. |
void |
show(int title,
int text)
Start the dialog and display it on screen. |
void |
show(java.lang.String text)
Start the dialog and display it on screen. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BUTTON_1
public static final int BUTTON_2
Constructor Detail |
---|
public InfoBox(Activity parent)
parent
- Parent application context.public InfoBox(Activity parent, int button)
parent
- Parent application context.button
- Resource ID of the text for the OK button.Method Detail |
---|
public void setLinkButton(int which, int label, int link)
which
- Which button to set: BUTTON_1 or BUTTON_2.label
- The button label as a resource ID.link
- Resource ID of the URL for the button.public void setSubtitle(int textId)
textId
- ID of the subtitle to display; if 0, don't show one.public void setSubtitle(java.lang.String text)
text
- Subtitle to display; if null, don't show one.public void show(int title, int text)
title
- Title for the dialog.text
- Text to display in the dialog.public void show(int text)
text
- Text to display in the dialog.public void show(java.lang.String text)
text
- Text to display in the dialog.protected void okButtonPressed()
protected void linkButtonPressed(int which)
which
- The ID of the link button which has been
clicked, as passed to
setLinkButton(int, int, int)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |