ContextWrapper.AttachBaseContext(Context) 方法

定义

设置此 ContextWrapper 的基本上下文。

[Android.Runtime.Register("attachBaseContext", "(Landroid/content/Context;)V", "GetAttachBaseContext_Landroid_content_Context_Handler")]
protected virtual void AttachBaseContext(Android.Content.Context? base);
[<Android.Runtime.Register("attachBaseContext", "(Landroid/content/Context;)V", "GetAttachBaseContext_Landroid_content_Context_Handler")>]
abstract member AttachBaseContext : Android.Content.Context -> unit
override this.AttachBaseContext : Android.Content.Context -> unit

参数

base
Context

此包装器的新基上下文。

属性

注解

设置此 ContextWrapper 的基本上下文。 然后,所有调用都将委托给基本上下文。 如果已设置基本上下文,则引发 IllegalStateException。

Java文档android.content.ContextWrapper.attachBaseContext(android.content.Context)

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于