public class SimpleDialog extends Dialog
| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleDialog.Builder |
static interface |
SimpleDialog.OnSelectionChangedListener
Interface definition for a callback to be invoked when the checked state of an item changed.
|
android.content.DialogInterface.OnCancelListener, android.content.DialogInterface.OnClickListener, android.content.DialogInterface.OnDismissListener, android.content.DialogInterface.OnKeyListener, android.content.DialogInterface.OnMultiChoiceClickListener, android.content.DialogInterface.OnShowListener| Modifier and Type | Field and Description |
|---|---|
protected static int |
MODE_CUSTOM |
protected static int |
MODE_ITEMS |
protected static int |
MODE_MESSAGE |
protected static int |
MODE_MULTI_ITEMS |
protected static int |
MODE_NONE |
ACTION_NEGATIVE, ACTION_NEUTRAL, ACTION_POSITIVE, mActionHeight, mActionMinWidth, mActionOuterHeight, mActionOuterPadding, mActionPadding, mContentPadding, mDialogHorizontalPadding, mDialogVerticalPadding, mInAnimationId, mNegativeAction, mNeutralAction, mOutAnimationId, mPositiveAction, mTitle, TITLE| Constructor and Description |
|---|
SimpleDialog(android.content.Context context) |
SimpleDialog(android.content.Context context,
int style) |
| Modifier and Type | Method and Description |
|---|---|
Dialog |
applyStyle(int resId) |
SimpleDialog |
checkBoxStyle(int resId)
Sets the style of check box.
|
Dialog |
clearContent()
Clear the content of this Dialog.
|
Dialog |
contentView(android.view.View v)
Set the content view of this Dialog.
|
int |
getSelectedIndex() |
int[] |
getSelectedIndexes() |
java.lang.CharSequence |
getSelectedValue() |
java.lang.CharSequence[] |
getSelectedValues() |
SimpleDialog |
itemHeight(int height)
Sets the height of item
|
SimpleDialog |
items(java.lang.CharSequence[] items,
int selectedIndex)
Set the list of items in single-choice mode.
|
SimpleDialog |
itemTextAppearance(int resId)
Sets the text color, size, style of the item view from the specified TextAppearance resource.
|
SimpleDialog |
message(java.lang.CharSequence message)
Set a message text to this SimpleDialog.
|
SimpleDialog |
message(int id)
Set a message text to this SimpleDialog.
|
SimpleDialog |
messageTextAppearance(int resId)
Sets the text color, size, style of the message view from the specified TextAppearance resource.
|
SimpleDialog |
messageTextColor(int color)
Sets the text color of the message view.
|
SimpleDialog |
multiChoiceItems(java.lang.CharSequence[] items,
int... selectedIndexes)
Set the list of items in multi-choice mode.
|
protected void |
onCreate() |
SimpleDialog |
onSelectionChangedListener(SimpleDialog.OnSelectionChangedListener listener)
Set a listener will be called when the checked state of a item is changed.
|
SimpleDialog |
radioButtonStyle(int resId)
Sets the style of radio button.
|
Dialog |
title(java.lang.CharSequence title)
Set the title of this Dialog.
|
actionBackground, actionBackground, actionRipple, actionTextAppearance, actionTextColor, actionTextColor, addContentView, backgroundColor, cancelable, canceledOnTouchOutside, contentMargin, contentMargin, contentView, cornerRadius, dimAmount, dismiss, dismissImmediately, dividerColor, dividerHeight, elevation, inAnimation, layoutDirection, layoutParams, maxElevation, maxHeight, maxWidth, negativeAction, negativeAction, negativeActionBackground, negativeActionBackground, negativeActionClickListener, negativeActionRipple, negativeActionTextAppearance, negativeActionTextColor, negativeActionTextColor, neutralAction, neutralAction, neutralActionBackground, neutralActionBackground, neutralActionClickListener, neutralActionRipple, neutralActionTextAppearance, neutralActionTextColor, neutralActionTextColor, onStart, outAnimation, positiveAction, positiveAction, positiveActionBackground, positiveActionBackground, positiveActionClickListener, positiveActionRipple, positiveActionTextAppearance, positiveActionTextColor, positiveActionTextColor, setCancelable, setCanceledOnTouchOutside, setContentView, setContentView, setContentView, setTitle, setTitle, showDivider, title, titleColor, titleTextAppearancecancel, closeOptionsMenu, create, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, getActionBar, getContext, getCurrentFocus, getLayoutInflater, getOwnerActivity, getSearchEvent, getVolumeControlStream, getWindow, hide, invalidateOptionsMenu, isShowing, onActionModeFinished, onActionModeStarted, onAttachedToWindow, onBackPressed, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onDetachedFromWindow, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onStop, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, registerForContextMenu, requestWindowFeature, setCancelMessage, setDismissMessage, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setOwnerActivity, setVolumeControlStream, show, takeKeyEvents, unregisterForContextMenuprotected static final int MODE_NONE
protected static final int MODE_MESSAGE
protected static final int MODE_ITEMS
protected static final int MODE_MULTI_ITEMS
protected static final int MODE_CUSTOM
public SimpleDialog(android.content.Context context)
public SimpleDialog(android.content.Context context,
int style)
public Dialog applyStyle(int resId)
applyStyle in class Dialogpublic Dialog clearContent()
DialogclearContent in class Dialogpublic Dialog title(java.lang.CharSequence title)
Dialogpublic Dialog contentView(android.view.View v)
DialogcontentView in class Dialogv - The content view.public SimpleDialog message(java.lang.CharSequence message)
message - public SimpleDialog message(int id)
id - The resourceId of text.public SimpleDialog messageTextAppearance(int resId)
resId - The resourceId value.public SimpleDialog messageTextColor(int color)
color - The color value.public SimpleDialog radioButtonStyle(int resId)
resId - The resourceId of style.public SimpleDialog checkBoxStyle(int resId)
resId - The resourceId of style.public SimpleDialog itemHeight(int height)
height - The size in pixels.public SimpleDialog itemTextAppearance(int resId)
resId - The resourceId value.public SimpleDialog items(java.lang.CharSequence[] items, int selectedIndex)
items - The list of items.selectedIndex - The index of selected item.public SimpleDialog multiChoiceItems(java.lang.CharSequence[] items, int... selectedIndexes)
items - The list of items.selectedIndexes - The indexes of selected items.public SimpleDialog onSelectionChangedListener(SimpleDialog.OnSelectionChangedListener listener)
listener - The SimpleDialog.OnSelectionChangedListener will be called.public int[] getSelectedIndexes()
public java.lang.CharSequence[] getSelectedValues()
public int getSelectedIndex()
public java.lang.CharSequence getSelectedValue()