|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.github.droidfu.activities.BetterActivityHelper
public class BetterActivityHelper
Field Summary | |
---|---|
static String |
ERROR_DIALOG_TITLE_RESOURCE
|
Constructor Summary | |
---|---|
BetterActivityHelper()
|
Method Summary | ||
---|---|---|
static android.app.ProgressDialog |
createProgressDialog(android.app.Activity activity,
int progressDialogTitleId,
int progressDialogMsgId)
Creates a new ProgressDialog |
|
static int |
getWindowFeatures(android.app.Activity activity)
|
|
static boolean |
isApplicationBroughtToBackground(android.content.Context context)
Checks if the application is in the background (i.e behind another application's Activity). |
|
static android.app.AlertDialog |
newErrorHandlerDialog(android.app.Activity activity,
String dialogTitle,
Exception error)
Displays a error dialog with an exception as its body. |
|
static
|
newListDialog(android.app.Activity context,
String dialogTitle,
List<T> elements,
DialogClickListener<T> listener,
boolean closeOnSelect)
Creates a AlertDialog that shows a list of elements. |
|
static
|
newListDialog(android.app.Activity context,
String dialogTitle,
List<T> elements,
DialogClickListener<T> listener,
boolean closeOnSelect,
int selectedItem)
|
|
static android.app.AlertDialog |
newMessageDialog(android.content.Context context,
String dialogTitle,
String screenMessage,
int iconResourceId)
Creates a new AlertDialog to display a simple message |
|
static android.app.AlertDialog |
newYesNoDialog(android.content.Context context,
String dialogTitle,
String screenMessage,
int iconResourceId,
android.content.DialogInterface.OnClickListener listener)
Creates a new Yes/No AlertDialog |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ERROR_DIALOG_TITLE_RESOURCE
Constructor Detail |
---|
public BetterActivityHelper()
Method Detail |
---|
public static int getWindowFeatures(android.app.Activity activity)
public static android.app.ProgressDialog createProgressDialog(android.app.Activity activity, int progressDialogTitleId, int progressDialogMsgId)
activity
- progressDialogTitleId
- The resource id for the title. If this is less than or equal to 0, a default title
is used.progressDialogMsgId
- The resource id for the message.
public static android.app.AlertDialog newYesNoDialog(android.content.Context context, String dialogTitle, String screenMessage, int iconResourceId, android.content.DialogInterface.OnClickListener listener)
context
- dialogTitle
- screenMessage
- iconResourceId
- listener
-
public static android.app.AlertDialog newMessageDialog(android.content.Context context, String dialogTitle, String screenMessage, int iconResourceId)
context
- dialogTitle
- screenMessage
- iconResourceId
-
public static android.app.AlertDialog newErrorHandlerDialog(android.app.Activity activity, String dialogTitle, Exception error)
activity
- dialogTitle
- error
-
public static <T> android.app.Dialog newListDialog(android.app.Activity context, String dialogTitle, List<T> elements, DialogClickListener<T> listener, boolean closeOnSelect)
T
- The type of each elementcontext
- dialogTitle
- the title or null to disable the titleelements
- List of elements to be displayed. Each elements toString() method will be called.listener
- The listener to handle the onClick events.closeOnSelect
- If true the dialog closes as soon as one list item is selected, otherwise multiple
onClick events may be sent.
public static <T> android.app.Dialog newListDialog(android.app.Activity context, String dialogTitle, List<T> elements, DialogClickListener<T> listener, boolean closeOnSelect, int selectedItem)
public static boolean isApplicationBroughtToBackground(android.content.Context context)
context
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |