java.lang.Object | |||
↳ | android.content.Context | ||
↳ | android.content.ContextWrapper | ||
↳ | android.view.ContextThemeWrapper |
Known Direct Subclasses |
Known Indirect Subclasses
AccountAuthenticatorActivity
,
ActionBarActivity
,
ActivityGroup
,
AliasActivity
,
ExpandableListActivity
,
FragmentActivity
,
LauncherActivity
,
ListActivity
,
NativeActivity
,
PreferenceActivity
,
TabActivity
|
A ContextWrapper that allows you to modify the theme from what is in the wrapped context.
[Expand]
Inherited Constants
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.content.Context
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||
|
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Call to set an "override configuration" on this context -- this is
a configuration that replies one or more values of the standard
configuration that is applied to the context.
|
||||||||||
|
Return a Resources instance for your application's package.
|
||||||||||
|
Return the handle to a system-level service by name.
|
||||||||||
|
Return the Theme object associated with this Context.
|
||||||||||
|
Set the base theme for this context.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Set the base context for this ContextWrapper.
|
||||||||||
|
Called by
setTheme(int)
and
getTheme()
to apply a theme
resource to the current Theme object.
|
[Expand]
Inherited Methods
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.content.ContextWrapper
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From class
android.content.Context
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From class
java.lang.Object
|
Call to set an "override configuration" on this context -- this is
a configuration that replies one or more values of the standard
configuration that is applied to the context. See
createConfigurationContext(Configuration)
for more
information.
This method can only be called once, and must be called before any
calls to
getResources()
are made.
Return a Resources instance for your application's package.
Return the handle to a system-level service by name. The class of the returned object varies by the requested name. Currently available names are:
WINDOW_SERVICE
("window")
WindowManager
.
LAYOUT_INFLATER_SERVICE
("layout_inflater")
LayoutInflater
for inflating layout resources
in this context.
ACTIVITY_SERVICE
("activity")
ActivityManager
for interacting with the
global activity state of the system.
POWER_SERVICE
("power")
PowerManager
for controlling power
management.
ALARM_SERVICE
("alarm")
AlarmManager
for receiving intents at the
time of your choosing.
NOTIFICATION_SERVICE
("notification")
NotificationManager
for informing the user
of background events.
KEYGUARD_SERVICE
("keyguard")
KeyguardManager
for controlling keyguard.
LOCATION_SERVICE
("location")
LocationManager
for controlling location
(e.g., GPS) updates.
SEARCH_SERVICE
("search")
SearchManager
for handling search.
VIBRATOR_SERVICE
("vibrator")
Vibrator
for interacting with the vibrator
hardware.
CONNECTIVITY_SERVICE
("connection")
ConnectivityManager
for
handling management of network connections.
WIFI_SERVICE
("wifi")
WifiManager
for management of
Wi-Fi connectivity.
INPUT_METHOD_SERVICE
("input_method")
InputMethodManager
for management of input methods.
UI_MODE_SERVICE
("uimode")
UiModeManager
for controlling UI modes.
DOWNLOAD_SERVICE
("download")
DownloadManager
for requesting HTTP downloads
Note: System services obtained via this API may be closely associated with the Context in which they are obtained from. In general, do not share the service objects between various different contexts (Activities, Applications, Services, Providers, etc.)
name | The name of the desired service. |
---|
Return the Theme object associated with this Context.
Set the base theme for this context. Note that this should be called
before any views are instantiated in the Context (for example before
calling
setContentView(View)
or
inflate(int, ViewGroup)
).
resid | The style resource describing the theme. |
---|
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.
newBase | The new base context for this wrapper. |
---|
Called by
setTheme(int)
and
getTheme()
to apply a theme
resource to the current Theme object. Can override to change the
default (simple) behavior. This method will not be called in multiple
threads simultaneously.
theme | The Theme object being modified. |
---|---|
resid | The theme style resource being applied to theme . |
first | Set to true if this is the first time a style is being applied to theme . |