Methods Summary |
---|
protected void | attachBaseContext(android.content.Context newBase)
super.attachBaseContext(newBase);
mBase = newBase;
|
public java.lang.Object | getSystemService(java.lang.String name)
if (LAYOUT_INFLATER_SERVICE.equals(name)) {
if (mInflater == null) {
mInflater = LayoutInflater.from(mBase).cloneInContext(this);
}
return mInflater;
}
return mBase.getSystemService(name);
|
public Resources.Theme | getTheme()
if (mTheme != null) {
return mTheme;
}
if (mThemeResource == 0) {
mThemeResource = com.android.internal.R.style.Theme;
}
initializeTheme();
return mTheme;
|
private void | initializeTheme()
final boolean first = mTheme == null;
if (first) {
mTheme = getResources().newTheme();
Resources.Theme theme = mBase.getTheme();
if (theme != null) {
mTheme.setTo(theme);
}
}
onApplyThemeResource(mTheme, mThemeResource, first);
|
protected void | onApplyThemeResource(Resources.Theme theme, int resid, boolean first)Called by {@link #setTheme} and {@link #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.applyStyle(resid, true);
|
public void | setTheme(int resid)
mThemeResource = resid;
initializeTheme();
|