語言

DialogFragment.SetStyle(DialogFragmentStyle, Int32) 方法

定義

呼叫以自訂片段對話的基本外觀與行為。

[Android.Runtime.Register("setStyle", "(II)V", "GetSetStyle_IIHandler")]
public virtual void SetStyle(Android.App.DialogFragmentStyle style, int theme);
[<Android.Runtime.Register("setStyle", "(II)V", "GetSetStyle_IIHandler")>]
abstract member SetStyle : Android.App.DialogFragmentStyle * int -> unit
override this.SetStyle : Android.App.DialogFragmentStyle * int -> unit

參數

style
DialogFragmentStyle

選擇標準樣式:可能為 #STYLE_NORMAL、 #STYLE_NO_TITLE、 #STYLE_NO_FRAME或 #STYLE_NO_INPUT。

theme
Int32

可選自訂主題。 若為 0,則會根據風格為你選擇一個合適的主題。

屬性

備註

呼叫以自訂片段對話的基本外觀與行為。 這可用於一些常見的對話行為,例如幫你選擇旗標、主題及其他選項。 同樣的效果也可以透過自己手動設定對話和視窗屬性來達成。 在建立片段對話框後呼叫此功能不會有效果。

Android 參考資料。android.app.DialogFragment.setStyle

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於