Most visited

Recently visited

Added in API level 1

MutableContextWrapper

public class MutableContextWrapper
extends ContextWrapper

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


ContextWrapper特殊版本,允许在初始设置基础上下文后进行修改。

摘要(Summary)

Inherited constants

From class android.content.Context

Public constructors

MutableContextWrapper(Context base)

公共方法(Public methods)

void setBaseContext(Context base)

更改此ContextWrapper的基础上下文。

继承方法(Inherited methods)

From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object

Public constructors

MutableContextWrapper

Added in API level 1
MutableContextWrapper (Context base)

参数(Parameters)
base Context

公共方法(Public methods)

setBaseContext

Added in API level 1
void setBaseContext (Context base)

更改此ContextWrapper的基础上下文。 所有的调用都会被委托给基础上下文。 与ContextWrapper不同,即使已经设置了基本上下文,也可以更改基本上下文。

参数(Parameters)
base Context: The new base context for this wrapper.

Hooray!