Udostępnij za pośrednictwem


ContextWrapper.AttachBaseContext(Context) Method

Definition

Set the base context for this 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

Parameters

base
Context

The new base context for this wrapper.

Attributes

Remarks

Set the base context for this ContextWrapper. All calls will then be delegated to the base context. Throws IllegalStateException if a base context has already been set.

Java documentation for android.content.ContextWrapper.attachBaseContext(android.content.Context).

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