Context.SetTheme(Int32) 方法

定義

設定此內容的基底主題。

[Android.Runtime.Register("setTheme", "(I)V", "GetSetTheme_IHandler")]
public abstract void SetTheme (int resid);
[<Android.Runtime.Register("setTheme", "(I)V", "GetSetTheme_IHandler")>]
abstract member SetTheme : int -> unit

參數

resid
Int32

描述主題的樣式資源。

屬性

備註

設定此內容的基底主題。 請注意,在內容中具現化任何檢視之前,應該先呼叫這個值(例如在呼叫 android.app.Activity#setContentViewandroid.view.LayoutInflater#inflate之前)。

android.content.Context.setTheme(int)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於