public class BottomSheetDialog extends AppCompatDialog
Dialog
s styled as a bottom sheet.DialogInterface.OnCancelListener, DialogInterface.OnClickListener, DialogInterface.OnDismissListener, DialogInterface.OnKeyListener, DialogInterface.OnMultiChoiceClickListener, DialogInterface.OnShowListener
BUTTON_NEGATIVE, BUTTON_NEUTRAL, BUTTON_POSITIVE, BUTTON1, BUTTON2, BUTTON3
Modifier | Constructor and Description |
---|---|
|
BottomSheetDialog(Context context) |
protected |
BottomSheetDialog(Context context,
boolean cancelable,
DialogInterface.OnCancelListener cancelListener) |
|
BottomSheetDialog(Context context,
int theme) |
Modifier and Type | Method and Description |
---|---|
protected void |
onCreate(Bundle savedInstanceState)
Similar to
Activity.onCreate(android.os.Bundle) , you should initialize your dialog
in this method, including calling Dialog.setContentView(int) . |
void |
setCancelable(boolean cancelable)
Sets whether this dialog is cancelable with the
BACK key. |
void |
setCanceledOnTouchOutside(boolean cancel)
Sets whether this dialog is canceled when touched outside the window's
bounds.
|
void |
setContentView(int layoutResId)
Set the screen content from a layout resource.
|
void |
setContentView(View view)
Set the screen content to an explicit view.
|
void |
setContentView(View view,
ViewGroup.LayoutParams params)
Set the screen content to an explicit view.
|
addContentView, findViewById, getDelegate, getSupportActionBar, invalidateOptionsMenu, onStop, onSupportActionModeFinished, onSupportActionModeStarted, onWindowStartingSupportActionMode, setTitle, setTitle, supportRequestWindowFeature
cancel, closeOptionsMenu, create, dismiss, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, getActionBar, getContext, getCurrentFocus, getLayoutInflater, getOwnerActivity, getSearchEvent, getVolumeControlStream, getWindow, hide, isShowing, onActionModeFinished, onActionModeStarted, onAttachedToWindow, onBackPressed, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onDetachedFromWindow, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onStart, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowDismissed, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, registerForContextMenu, requestWindowFeature, setCancelMessage, setDismissMessage, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setOwnerActivity, setVolumeControlStream, show, takeCancelAndDismissListeners, takeKeyEvents, unregisterForContextMenu
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onProvideKeyboardShortcuts
protected BottomSheetDialog(@NonNull Context context, boolean cancelable, DialogInterface.OnCancelListener cancelListener)
public void setContentView(@LayoutRes int layoutResId)
Dialog
setContentView
in class AppCompatDialog
layoutResId
- Resource ID to be inflated.protected void onCreate(Bundle savedInstanceState)
Dialog
Activity.onCreate(android.os.Bundle)
, you should initialize your dialog
in this method, including calling Dialog.setContentView(int)
.onCreate
in class AppCompatDialog
savedInstanceState
- If this dialog is being reinitialized after a
the hosting activity was previously shut down, holds the result from
the most recent call to Dialog.onSaveInstanceState()
, or null if this
is the first time.public void setContentView(View view)
Dialog
setContentView
in class AppCompatDialog
view
- The desired content to display.public void setContentView(View view, ViewGroup.LayoutParams params)
Dialog
setContentView
in class AppCompatDialog
view
- The desired content to display.params
- Layout parameters for the view.public void setCancelable(boolean cancelable)
Dialog
BACK
key.setCancelable
in class Dialog
public void setCanceledOnTouchOutside(boolean cancel)
Dialog
setCanceledOnTouchOutside
in class Dialog
cancel
- Whether the dialog should be canceled when touched outside
the window.