Added in API level 1

MutableContextWrapper


open class MutableContextWrapper : ContextWrapper
kotlin.Any
   ↳ android.content.Context
   ↳ android.content.ContextWrapper
   ↳ android.content.MutableContextWrapper

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

Summary

Inherited constants
Public constructors

Public methods
open Unit

Change the base context for this ContextWrapper.

Inherited functions

Public constructors

MutableContextWrapper

Added in API level 1
MutableContextWrapper(base: Context!)

Public methods

setBaseContext

Added in API level 1
open fun setBaseContext(base: Context!): Unit

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 Context!: The new base context for this wrapper.