ContextThemeWrapper 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| ContextThemeWrapper() |
建立一個沒有主題和基礎上下文的新上下文包裝器。 |
| ContextThemeWrapper(Context, Resources+Theme) |
建立一個沒有主題和基礎上下文的新上下文包裝器。 |
| ContextThemeWrapper(Context, Int32) |
建立一個新的上下文包裝器,包含指定的主題。 |
| ContextThemeWrapper(IntPtr, JniHandleOwnership) |
用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。 |
ContextThemeWrapper()
建立一個沒有主題和基礎上下文的新上下文包裝器。
[Android.Runtime.Register(".ctor", "()V", "")]
public ContextThemeWrapper();
- 屬性
備註
建立一個沒有主題和基礎上下文的新上下文包裝器。
<strong>Note:</strong><在呼叫新建構的上下文包裝器中其他方法之前,必須 強><且必須> 強 附加#attachBaseContext(Context)。
Java 文件 android.view.ContextThemeWrapper.ContextThemeWrapper()。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
ContextThemeWrapper(Context, Resources+Theme)
建立一個沒有主題和基礎上下文的新上下文包裝器。
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/content/res/Resources$Theme;)V", "", ApiSince=23)]
public ContextThemeWrapper(Android.Content.Context? base, Android.Content.Res.Resources.Theme? theme);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/content/res/Resources$Theme;)V", "", ApiSince=23)>]
new Android.Views.ContextThemeWrapper : Android.Content.Context * Android.Content.Res.Resources.Theme -> Android.Views.ContextThemeWrapper
參數
- base
- Context
Android.Content.Context 的 base 值。
- theme
- Resources.Theme
主題使用的 Android.Content.Res.Resources+Theme 值。
- 屬性
備註
Java 文件 android.view.ContextThemeWrapper.ContextThemeWrapper()。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
ContextThemeWrapper(Context, Int32)
建立一個新的上下文包裝器,包含指定的主題。
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;I)V", "")]
public ContextThemeWrapper(Android.Content.Context? base, int themeResId);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;I)V", "")>]
new Android.Views.ContextThemeWrapper : Android.Content.Context * int -> Android.Views.ContextThemeWrapper
參數
- base
- Context
基礎背景
- themeResId
- Int32
將套用到基底上下文主題上的主題資源 ID
- 屬性
備註
建立一個新的上下文包裝器,包含指定的主題。
指定的主題會套用在基礎上下文的主題之上。 任何未在主題中明確定義的屬性,由 <var>themeResId</var> 識別,將保留其原始值。
Java 文件 android.view.ContextThemeWrapper.ContextThemeWrapper(android.content.Context, int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
ContextThemeWrapper(IntPtr, JniHandleOwnership)
用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。
protected ContextThemeWrapper(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Views.ContextThemeWrapper : nativeint * Android.Runtime.JniHandleOwnership -> Android.Views.ContextThemeWrapper
參數
- transfer
- JniHandleOwnership
JniHandleOwnershipA 指示如何處理javaReference
備註
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。