Most visited

Recently visited

BottomSheetDialogFragment

public class BottomSheetDialogFragment
extends AppCompatDialogFragment

java.lang.Object
   ↳ android.support.v4.app.Fragment
     ↳ android.support.v4.app.DialogFragment
       ↳ android.support.v7.app.AppCompatDialogFragment
         ↳ android.support.design.widget.BottomSheetDialogFragment


莫代尔底部表。 这是DialogFragment版本,它使用BottomSheetDialog而不是浮动对话框显示底部工作表。

Summary

Inherited constants

From class android.support.v4.app.DialogFragment

Public constructors

BottomSheetDialogFragment()

Public methods

Dialog onCreateDialog(Bundle savedInstanceState)

重写以构建您自己的自定义Dialog容器。

Inherited methods

From class android.support.v7.app.AppCompatDialogFragment
From class android.support.v4.app.DialogFragment
From class android.support.v4.app.Fragment
From class java.lang.Object
From interface android.content.DialogInterface.OnCancelListener
From interface android.content.DialogInterface.OnDismissListener
From interface android.content.ComponentCallbacks
From interface android.view.View.OnCreateContextMenuListener

Public constructors

BottomSheetDialogFragment

BottomSheetDialogFragment ()

Public methods

onCreateDialog

Dialog onCreateDialog (Bundle savedInstanceState)

重写以构建您自己的自定义Dialog容器。 这通常用于显示AlertDialog而不是通用的Dialog; 这样做时,由于AlertDialog处理自己的内容, onCreateView(LayoutInflater, ViewGroup, Bundle)不需要实施onCreateView(LayoutInflater, ViewGroup, Bundle)

该方法将在onCreate(Bundle)之后和onCreateView(LayoutInflater, ViewGroup, Bundle)之前onCreateView(LayoutInflater, ViewGroup, Bundle) 默认实现只是实例化并返回一个Dialog类。

注意:DialogFragment拥有Dialog.setOnCancelListenerDialog.setOnDismissListener回调。 你不能自己设置它们。 要了解这些事件,请覆盖onCancel(DialogInterface)onDismiss(DialogInterface)

Parameters
savedInstanceState Bundle: The last saved instance state of the Fragment, or null if this is a freshly created Fragment.
Returns
Dialog Return a new Dialog instance to be displayed by the Fragment.

Hooray!