to top
Android APIs
public class

MutableContextWrapper

extends ContextWrapper
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.content.MutableContextWrapper

Class Overview

Special version of ContextWrapper that allows the base context to be modified after it is initially set.

Summary

[Expand]
Inherited Constants
From class android.content.Context
Public Constructors
MutableContextWrapper(Context base)
Public Methods
void setBaseContext(Context base)
Change the base context for this ContextWrapper.
[Expand]
Inherited Methods
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object

Public Constructors

public MutableContextWrapper (Context base)

Added in API level 1

Public Methods

public void setBaseContext (Context base)

Added in API level 1

Change the base context for this ContextWrapper. All calls will then be delegated to the base context. Unlike ContextWrapper, the base context can be changed even after one is already set.

Parameters
base The new base context for this wrapper.