共用方式為


DialogFragment.ShowsDialog Property

Definition

Return the current value of #setShowsDialog(boolean). -or- Controls whether this fragment should be shown in a dialog.

public virtual bool ShowsDialog { [Android.Runtime.Register("getShowsDialog", "()Z", "GetGetShowsDialogHandler")] get; [Android.Runtime.Register("setShowsDialog", "(Z)V", "GetSetShowsDialog_ZHandler")] set; }
[<get: Android.Runtime.Register("getShowsDialog", "()Z", "GetGetShowsDialogHandler")>]
[<set: Android.Runtime.Register("setShowsDialog", "(Z)V", "GetSetShowsDialog_ZHandler")>]
member this.ShowsDialog : bool with get, set

Property Value

Attributes

Remarks

Property getter documentation:

Return the current value of #setShowsDialog(boolean).

Java documentation for android.app.DialogFragment.getShowsDialog().

Property setter documentation:

Controls whether this fragment should be shown in a dialog. If not set, no Dialog will be created in #onActivityCreated(Bundle), and the fragment's view hierarchy will thus not be added to it. This allows you to instead use it as a normal fragment (embedded inside of its activity).

This is normally set for you based on whether the fragment is associated with a container view ID passed to FragmentTransaction#add(int, Fragment) FragmentTransaction.add(int, Fragment). If the fragment was added with a container, setShowsDialog will be initialized to false; otherwise, it will be true.

Java documentation for android.app.DialogFragment.setShowsDialog(boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to