|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.content.Context
android.content.ContextWrapper
android.view.ContextThemeWrapper
public class ContextThemeWrapper
A ContextWrapper that allows you to modify the theme from what is in the wrapped context.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
ContextThemeWrapper()
|
|
ContextThemeWrapper(Context base,
int themeres)
|
|
| Method Summary | |
|---|---|
protected void |
attachBaseContext(Context newBase)
Set the base context for this ContextWrapper. |
Object |
getSystemService(String name)
Return the handle to a system-level service by name. |
Resources.Theme |
getTheme()
Return the Theme object associated with this Context. |
protected void |
onApplyThemeResource(Resources.Theme theme,
int resid,
boolean first)
Called by setTheme(int) and getTheme() to apply a theme
resource to the current Theme object. |
void |
setTheme(int resid)
Set the base theme for this context. |
| Methods inherited from class android.content.Context |
|---|
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContextThemeWrapper()
public ContextThemeWrapper(Context base,
int themeres)
| Method Detail |
|---|
protected void attachBaseContext(Context newBase)
ContextWrapper
attachBaseContext in class ContextWrappernewBase - The new base context for this wrapper.public void setTheme(int resid)
ContextActivity.setContentView(int) or
LayoutInflater.inflate(int, android.view.ViewGroup)).
setTheme in class ContextWrapperresid - The style resource describing the theme.public Resources.Theme getTheme()
Context
getTheme in class ContextWrapperpublic Object getSystemService(String name)
ContextContext.WINDOW_SERVICE ("window")
WindowManager.
Context.LAYOUT_INFLATER_SERVICE ("layout_inflater")
LayoutInflater for inflating layout resources
in this context.
Context.ACTIVITY_SERVICE ("activity")
ActivityManager for interacting with the
global activity state of the system.
Context.POWER_SERVICE ("power")
PowerManager for controlling power
management.
Context.ALARM_SERVICE ("alarm")
AlarmManager for receiving intents at the
time of your choosing.
Context.NOTIFICATION_SERVICE ("notification")
NotificationManager for informing the user
of background events.
Context.KEYGUARD_SERVICE ("keyguard")
KeyguardManager for controlling keyguard.
Context.LOCATION_SERVICE ("location")
LocationManager for controlling location
(e.g., GPS) updates.
Context.SEARCH_SERVICE ("search")
SearchManager for handling search.
Context.VIBRATOR_SERVICE ("vibrator")
Vibrator for interacting with the vibrator
hardware.
Context.CONNECTIVITY_SERVICE ("connection")
ConnectivityManager for
handling management of network connections.
Context.WIFI_SERVICE ("wifi")
WifiManager for management of
Wi-Fi connectivity.
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.)
getSystemService in class ContextWrappername - The name of the desired service.
Context.WINDOW_SERVICE,
WindowManager,
Context.LAYOUT_INFLATER_SERVICE,
LayoutInflater,
Context.ACTIVITY_SERVICE,
ActivityManager,
Context.POWER_SERVICE,
PowerManager,
Context.ALARM_SERVICE,
AlarmManager,
Context.NOTIFICATION_SERVICE,
NotificationManager,
Context.KEYGUARD_SERVICE,
KeyguardManager,
Context.LOCATION_SERVICE,
LocationManager,
Context.SEARCH_SERVICE,
SearchManager,
Context.SENSOR_SERVICE,
SensorManager,
Context.VIBRATOR_SERVICE,
Vibrator,
Context.CONNECTIVITY_SERVICE,
ConnectivityManager,
Context.WIFI_SERVICE,
WifiManager,
Context.AUDIO_SERVICE,
AudioManager,
Context.TELEPHONY_SERVICE,
android.internal.TelephonyManager
protected void onApplyThemeResource(Resources.Theme theme,
int resid,
boolean first)
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.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||