/frameworks/base/core/java/android/content/res/ |
ResourcesImpl.java | 528 int density, @Nullable Resources.Theme theme) 574 // that was inflated against the specified theme. Skip the cache if 577 final Drawable cachedDrawable = caches.getInstance(key, wrapper, theme); 585 // unresolved theme attributes. 609 // Determine if the drawable has unresolved theme attributes. If it 610 // does, we'll need to apply a theme and store it in a theme-specific 613 if (canApplyTheme && theme != null) { 615 dr.applyTheme(theme); [all...] |
/frameworks/base/graphics/java/android/graphics/drawable/ |
InsetDrawable.java | 27 import android.content.res.Resources.Theme; 133 @NonNull AttributeSet attrs, @Nullable Theme theme) 135 final TypedArray a = obtainAttributes(r, theme, attrs, R.styleable.InsetDrawable); 138 super.inflate(r, parser, attrs, theme); 146 public void applyTheme(@NonNull Theme t) { 168 // If we're not waiting on a theme, verify required attributes. 186 // Extract the theme attributes, if any.
|
ShapeDrawable.java | 25 import android.content.res.Resources.Theme; 401 public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme) 403 super.inflate(r, parser, attrs, theme); 405 final TypedArray a = obtainAttributes(r, theme, attrs, R.styleable.ShapeDrawable); 430 public void applyTheme(Theme t) { 444 // Apply theme to contained color state list. 460 // Extract the theme attributes, if any. 625 * after inflating or applying a theme.
|
NinePatchDrawable.java | 24 import android.content.res.Resources.Theme; 396 public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme) 398 super.inflate(r, parser, attrs, theme); 400 final TypedArray a = obtainAttributes(r, theme, attrs, R.styleable.NinePatchDrawable); 417 // Extract the theme attributes, if any. 474 public void applyTheme(@NonNull Theme t) {
|
RippleDrawable.java | 29 import android.content.res.Resources.Theme; 422 @NonNull AttributeSet attrs, @Nullable Theme theme) 424 final TypedArray a = obtainAttributes(r, theme, attrs, R.styleable.RippleDrawable); 430 super.inflate(r, parser, attrs, theme); 481 // Extract the theme attributes, if any. 502 public void applyTheme(@NonNull Theme t) { [all...] |
AdaptiveIconDrawable.java | 25 import android.content.res.Resources.Theme; 208 @NonNull AttributeSet attrs, @Nullable Theme theme) 210 super.inflate(r, parser, attrs, theme); 229 inflateLayers(r, parser, attrs, theme); 411 public void applyTheme(@NonNull Theme t) { 448 @NonNull AttributeSet attrs, @Nullable Theme theme) 475 final TypedArray a = obtainAttributes(r, theme, attrs, 480 // If the layer doesn't have a drawable or unresolved theme [all...] |
/cts/hostsidetests/theme/app/src/android/theme/app/ |
GenerateImagesActivity.java | 17 package android.theme.app; 44 private static final String OUT_DIR = "cts-theme-assets"; 149 final ThemeDeviceActivity.Theme theme = ThemeDeviceActivity.THEMES[mCurrentTheme]; local 150 if (theme.apiLevel > VERSION.SDK_INT) { 151 Log.v(TAG, "Skipping theme \"" + theme.name 152 + "\" (requires API " + theme.apiLevel + ")"); 156 Log.v(TAG, "Generating images for theme \"" + theme.name + "\"...") [all...] |
/external/robolectric/v1/src/main/java/com/xtremelabs/robolectric/shadows/ |
ShadowContext.java | 60 abstract public Resources.Theme getTheme();
|
ShadowContextWrapper.java | 52 public Resources.Theme getTheme() {
|
/frameworks/base/core/tests/coretests/src/android/widget/ |
ListViewTest.java | 103 public Resources.Theme getTheme() {
|
/frameworks/base/libs/androidfw/tests/ |
ResTable_test.cpp | 108 ResTable::Theme theme(table); 109 ASSERT_EQ(NO_ERROR, theme.applyStyle(basic::R::style::Theme1)); 113 ssize_t index = theme.getAttribute(basic::R::attr::attr1, &val, &specFlags); 118 index = theme.getAttribute(basic::R::attr::attr2, &val, &specFlags); 132 ResTable::Theme theme(table); 133 ASSERT_EQ(NO_ERROR, theme.applyStyle(basic::R::style::Theme2)); 137 ssize_t index = theme.getAttribute(basic::R::attr::attr1, &val, &specFlags); 142 index = theme.getAttribute(basic::R::attr::attr2, &val, &specFlags) [all...] |
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/util/ |
WizardManagerHelper.java | 21 import android.content.res.Resources.Theme; 47 public static final String EXTRA_THEME = "theme"; 60 * theme used in setup wizard for Nougat MR1. 65 * Passed in a setup wizard intent as {@link #EXTRA_THEME}. This is the default theme used in 72 * theme used in setup wizard for O DR. 77 * Passed in a setup wizard intent as {@link #EXTRA_THEME}. This is the default theme used in 188 * Checks the intent whether the extra indicates that the light theme should be used or not. If 189 * the theme is not specified in the intent, or the theme specified is unknown, the value def 192 * @param intent The intent used to start the activity, which the theme extra will be read from 197 final String theme = intent.getStringExtra(EXTRA_THEME); local 233 final String theme = intent.getStringExtra(EXTRA_THEME); local [all...] |
/frameworks/support/samples/Support4Demos/src/com/example/android/supportv4/app/ |
FragmentDialogSupport.java | 94 case 4: return "STYLE_NORMAL with dark fullscreen theme"; 95 case 5: return "STYLE_NORMAL with light theme"; 96 case 6: return "STYLE_NO_TITLE with light theme"; 97 case 7: return "STYLE_NO_FRAME with light theme"; 98 case 8: return "STYLE_NORMAL with light fullscreen theme"; 128 int style = DialogFragment.STYLE_NORMAL, theme = 0; local 139 case 2: theme = android.R.style.Theme_Panel; break; 140 case 4: theme = android.R.style.Theme; break; 141 case 5: theme = android.R.style.Theme_Light; break [all...] |
/frameworks/support/v7/appcompat/tests/src/android/support/v7/app/ |
DrawerLayoutActivity.java | 93 // your activity theme to have attribute named "drawerArrowStyle" that points 114 // from the theme makes the status bar slightly darker. 130 final Resources.Theme theme = mDrawerLayout.getContext().getTheme(); 131 final TypedArray a = theme.obtainStyledAttributes(
|
/packages/apps/Car/Stream/src/com/android/car/stream/media/ |
MediaAppInfo.java | 36 /** Third-party defined application theme to use **/ 38 = "com.google.android.gms.car.application.theme"; 90 appTheme = appInfo.theme; 142 Resources.Theme theme = packageContext.getTheme(); local 143 ta = theme.obtainStyledAttributes(new int[]{
|
/frameworks/support/graphics/drawable/static/src/android/support/graphics/drawable/ |
VectorDrawableCompat.java | 21 import android.content.res.Resources.Theme; 191 * Note that theme attributes in XML file are supported through 192 * <code>{@link #inflate(Resources, XmlPullParser, AttributeSet, Theme)}</code>. 487 // Don't support re-applying themes. The initial theme loading is working. 542 * @param theme the theme of this vector drawable, it can be null. 547 @Nullable Theme theme) { 550 drawable.mDelegateDrawable = ResourcesCompat.getDrawable(res, resId, theme); 567 return createFromXmlInner(res, parser, attrs, theme); [all...] |
/frameworks/base/core/java/android/widget/ |
ArrayAdapter.java | 462 * Sets the {@link Resources.Theme} against which drop-down views are 465 * By default, drop-down views are inflated against the theme of the 468 * @param theme the theme against which to inflate drop-down views or 469 * {@code null} to use the theme from the adapter's context 473 public void setDropDownViewTheme(@Nullable Resources.Theme theme) { 474 if (theme == null) { 476 } else if (theme == mInflater.getContext().getTheme()) { 479 final Context context = new ContextThemeWrapper(mContext, theme); [all...] |
/frameworks/base/tools/layoutlib/bridge/src/android/content/res/ |
Resources_Delegate.java | 45 import android.content.res.Resources.Theme; 155 static Drawable getDrawable(Resources resources, int id, Theme theme) { 163 drawable = constantState.newDrawable(resources, theme); 166 ResourceHelper.getDrawable(value.getSecond(), resources.mContext, theme); 189 static int getColor(Resources resources, int id, Theme theme) throws NotFoundException { 215 return getColorStateList(resources, id, theme).getDefaultColor(); 224 static ColorStateList getColorStateList(Resources resources, int id, Theme theme) [all...] |
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
VectorDrawableTest.java | 24 import android.content.res.Resources.Theme; 255 Theme theme = mResources.newTheme(); local 256 theme.applyStyle(R.style.Theme_ThemedDrawableTest, true); 257 vectorDrawable.inflate(mResources, parser, attrs, theme); 459 // Ensure theme density is applied correctly. 460 final Theme t = res.newTheme();
|
/cts/tests/tests/widget/src/android/widget/cts/ |
SpinnerTest.java | 34 import android.content.res.Resources.Theme; 133 final Resources.Theme popupTheme = mActivity.getResources().newTheme(); 271 Theme theme = mActivity.getResources().newTheme(); local 273 android.R.attr.spinnerStyle, 0, Spinner.MODE_DIALOG, theme); 275 assertSame(theme, themeSpinner.getPopupContext().getTheme());
|
CursorAdapterTest.java | 28 import android.content.res.Resources.Theme; 281 Theme theme = mContext.getResources().newTheme(); local 282 cursorAdapter.setDropDownViewTheme(theme); 283 assertSame(theme, cursorAdapter.getDropDownViewTheme());
|
/cts/tests/tests/content/src/android/content/cts/ |
ContextTest.java | 23 import android.content.res.Resources.Theme; 193 final Theme testTheme = mContext.getTheme();
|
/frameworks/base/libs/androidfw/ |
AttributeResolution.cpp | 58 bool ResolveAttrs(ResTable::Theme* theme, uint32_t def_style_attr, 64 ALOGI("APPLY STYLE: theme=0x%p defStyleAttr=0x%x defStyleRes=0x%x", theme, 68 const ResTable& res = theme->getResTable(); 78 if (theme->getAttribute(def_style_attr, &value, &def_style_bag_type_set_flags) >= 0) { 118 // style, and finally the theme. 144 theme->resolveAttributeReference(&value, block, &resid, &type_set_flags, &config); 151 // it in the theme! 152 ssize_t new_block = theme->getAttribute(cur_ident, &value, &type_set_flags) [all...] |
/frameworks/support/graphics/drawable/static/tests/src/android/support/graphics/drawable/tests/ |
VectorDrawableTest.java | 26 import android.content.res.Resources.Theme; 135 private Theme mTheme;
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/ |
HelpUtils.java | 27 import android.content.res.Resources.Theme; 206 intent.putExtra(EXTRA_THEME, 0 /* Light theme */);
|