Class SingleChoiceDialog
-
- All Implemented Interfaces:
-
android.content.DialogInterface,android.view.KeyEvent.Callback,android.view.View.OnCreateContextMenuListener,android.view.Window.Callback
public class SingleChoiceDialog extends Dialog
-
-
Field Summary
Fields Modifier and Type Field Description protected ContextmContextprotected ViewmRootViewprotected TextViewmTVTitleprotected TextViewmButtonOKprotected TextViewmButtonCancelprotected ListViewmListViewprotected List<String>mListprotected DialogInterface.OnClickListenermOkClickListenerprotected DialogInterface.OnClickListenermCancelClickListenerpublic final static intBUTTON1public final static intBUTTON2public final static intBUTTON3public final static intBUTTON_NEGATIVEpublic final static intBUTTON_NEUTRALpublic final static intBUTTON_POSITIVE
-
Constructor Summary
Constructors Constructor Description SingleChoiceDialog(Context context, List<String> list)
-
Method Summary
Modifier and Type Method Description voidinitView(Context context)voidsetTitle(String title)voidsetOnOKButtonListener(DialogInterface.OnClickListener onClickListener)voidsetOnCancelButtonListener(DialogInterface.OnClickListener onClickListener)voidonButtonOK()voidonButtonCancel()voidinitData()intgetSelectItem()-
Methods inherited from class android.app.Dialog
addContentView, cancel, closeOptionsMenu, create, dismiss, 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, onStart, onStop, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, openContextMenu, openOptionsMenu, registerForContextMenu, requestWindowFeature, requireViewById, setCancelMessage, setCancelable, setCanceledOnTouchOutside, setContentView, setDismissMessage, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setOwnerActivity, setTitle, setVolumeControlStream, show, takeKeyEvents, unregisterForContextMenu -
Methods inherited from class android.view.Window.Callback
onPointerCaptureChanged, onProvideKeyboardShortcuts -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
initView
void initView(Context context)
-
setOnOKButtonListener
void setOnOKButtonListener(DialogInterface.OnClickListener onClickListener)
-
setOnCancelButtonListener
void setOnCancelButtonListener(DialogInterface.OnClickListener onClickListener)
-
onButtonOK
void onButtonOK()
-
onButtonCancel
void onButtonCancel()
-
initData
void initData()
-
getSelectItem
int getSelectItem()
-
-
-
-