/frameworks/base/libs/androidfw/tests/ |
H A D | Theme_bench.cpp | 41 auto theme = assets.NewTheme(); local 42 theme->ApplyStyle(kStyleId, false /* force */); 58 std::unique_ptr<ResTable::Theme> theme{new ResTable::Theme(res_table)}; 59 theme->applyStyle(kStyleId, false /* force */); 70 auto theme = assets.NewTheme(); local 71 theme->ApplyStyle(kStyleId, false /* force */); 77 theme->GetAttribute(kAttrId, &value, &flags); 87 std::unique_ptr<ResTable::Theme> theme{new ResTable::Theme(res_table)}; 88 theme->applyStyle(kStyleId, false /* force */); 94 theme [all...] |
H A D | Theme_test.cpp | 60 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); local 61 EXPECT_EQ(0u, theme->GetChangingConfigurations()); 62 EXPECT_EQ(&assetmanager, theme->GetAssetManager()); 66 EXPECT_EQ(kInvalidCookie, theme->GetAttribute(app::R::attr::attr_one, &value, &flags)); 73 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); local 74 ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleOne)); 80 cookie = theme->GetAttribute(app::R::attr::attr_one, &value, &flags); 86 cookie = theme->GetAttribute(app::R::attr::attr_two, &value, &flags); 97 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); local 98 ASSERT_TRUE(theme 130 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); local 164 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); local 199 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); local [all...] |
/frameworks/base/core/java/android/content/res/ |
H A D | ConfigurationBoundResourceCache.java | 33 * @param theme the theme where the resource will be used 37 public T getInstance(long key, Resources resources, Resources.Theme theme) { argument 38 final ConstantState<T> entry = get(key, theme); 40 return entry.newInstance(resources, theme);
|
H A D | DrawableCache.java | 22 * Class which can be used to cache Drawable resources against a theme. 30 * @param theme the theme where the resource will be used 34 public Drawable getInstance(long key, Resources resources, Resources.Theme theme) { argument 35 final Drawable.ConstantState entry = get(key, theme); 37 return entry.newDrawable(resources, theme);
|
H A D | ConstantState.java | 58 * implemented for resources that can have a theme applied. 60 public T newInstance(Resources res, Resources.Theme theme) { argument
|
/frameworks/base/core/java/android/service/wallpaper/ |
H A D | WallpaperSettingsActivity.java | 26 * proper theme of the activity depending on how it is being used. 40 Resources.Theme theme = getTheme(); 42 theme.applyStyle(com.android.internal.R.style.PreviewWallpaperSettings, true); 44 theme.applyStyle(com.android.internal.R.style.ActiveWallpaperSettings, true);
|
/frameworks/base/tools/layoutlib/bridge/src/android/content/res/ |
H A D | ComplexColor_Accessor.java | 36 @NonNull XmlPullParser parser, @NonNull AttributeSet attrs, @Nullable Theme theme) 38 return GradientColor.createFromXmlInner(r, parser, attrs, theme); 42 @NonNull XmlPullParser parser, @NonNull AttributeSet attrs, @Nullable Theme theme) 44 return ColorStateList.createFromXmlInner(r, parser, attrs, theme); 35 createGradientColorFromXmlInner(@onNull Resources r, @NonNull XmlPullParser parser, @NonNull AttributeSet attrs, @Nullable Theme theme) argument 41 createColorStateListFromXmlInner(@onNull Resources r, @NonNull XmlPullParser parser, @NonNull AttributeSet attrs, @Nullable Theme theme) argument
|
H A D | AssetManager_Delegate.java | 39 /*package*/ static void deleteTheme(AssetManager manager, long theme) { argument 40 Resources_Theme_Delegate.getDelegateManager().removeJavaReferenceFor(theme);
|
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/util/ |
H A D | WizardManagerHelper.java | 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. 193 * @param def The default value if the theme i 209 isLightTheme(String theme, boolean def) argument 256 getThemeRes(String theme, @StyleRes int defaultTheme) argument [all...] |
H A D | FallbackThemeWrapper.java | 25 * Same as {@link ContextThemeWrapper}, but the base context's theme attributes take precedence 26 * over the wrapper context's. This is used to provide default values for theme attributes 28 * theme. 33 * Creates a new context wrapper with the specified theme. 35 * The specified theme will be applied as fallbacks to the base context's theme. Any attributes 36 * defined in the base context's theme will retain their original values. Otherwise values in 40 * @param themeResId The theme to use as fallback. 50 protected void onApplyThemeResource(Theme theme, int resId, boolean first) { argument 51 theme [all...] |
/frameworks/support/v7/appcompat/src/android/support/v7/widget/ |
H A D | ThemedSpinnerAdapter.java | 33 * against a different theme than normal views. 35 * Classes that implement this interface should use the theme provided to 47 * @param theme the context against which to inflate drop-down views, or 48 * {@code null} to use the default theme 51 void setDropDownViewTheme(@Nullable Resources.Theme theme); argument 92 * public void setDropDownViewTheme(@Nullable Resources.Theme theme) { 93 * // Pass the new theme to the helper 94 * mDropDownHelper.setDropDownViewTheme(theme); 119 * @param theme the theme passe 122 setDropDownViewTheme(@ullable Resources.Theme theme) argument [all...] |
/frameworks/support/frameworks/support/samples/Support4Demos/src/com/example/android/supportv4/media/utils/ |
H A D | ResourceHelper.java | 30 * Get a color value from a theme attribute. 32 * @param attribute theme attribute. 43 packageContext.setTheme(applicationInfo.theme); 44 Resources.Theme theme = packageContext.getTheme(); 45 TypedArray ta = theme.obtainStyledAttributes(new int[] {attribute});
|
/frameworks/support/samples/Support4Demos/src/com/example/android/supportv4/media/utils/ |
H A D | ResourceHelper.java | 30 * Get a color value from a theme attribute. 32 * @param attribute theme attribute. 43 packageContext.setTheme(applicationInfo.theme); 44 Resources.Theme theme = packageContext.getTheme(); 45 TypedArray ta = theme.obtainStyledAttributes(new int[] {attribute});
|
/frameworks/base/core/java/android/widget/ |
H A D | ThemedSpinnerAdapter.java | 27 * against a different theme than normal views. 29 * Classes that implement this interface should use the theme provided to 38 * @param theme the context against which to inflate drop-down views, or 39 * {@code null} to use the default theme 42 void setDropDownViewTheme(@Nullable Resources.Theme theme); argument
|
H A D | ResourceCursorAdapter.java | 106 * By default, drop-down views are inflated against the theme of the 109 * @param theme the theme against which to inflate drop-down views or 110 * {@code null} to use the theme from the adapter's context 114 public void setDropDownViewTheme(Resources.Theme theme) { argument 115 super.setDropDownViewTheme(theme); 117 if (theme == null) { 119 } else if (theme == mInflater.getContext().getTheme()) { 122 final Context context = new ContextThemeWrapper(mContext, theme);
|
/frameworks/base/tools/layoutlib/studio-custom-widgets/src/com/android/tools/idea/editors/theme/widgets/ |
H A D | PressedButton.java | 17 package com.android.tools.idea.editors.theme.widgets;
|
/frameworks/base/core/java/android/view/ |
H A D | ContextThemeWrapper.java | 27 * A context wrapper that allows you to modify or replace the theme of the 38 * Creates a new context wrapper with no theme and no base context. 49 * Creates a new context wrapper with the specified theme. 51 * The specified theme will be applied on top of the base context's theme. 52 * Any attributes not explicitly defined in the theme identified by 56 * @param themeResId the resource ID of the theme to be applied on top of 57 * the base context's theme 65 * Creates a new context wrapper with the specified theme. 67 * Unlike {@link #ContextThemeWrapper(Context, int)}, the theme passe 73 ContextThemeWrapper(Context base, Resources.Theme theme) argument 185 onApplyThemeResource(Resources.Theme theme, int resId, boolean first) argument [all...] |
/frameworks/support/v7/appcompat/src/android/support/v7/view/ |
H A D | ContextThemeWrapper.java | 33 * A ContextWrapper that allows you to modify the theme from what is in the 47 * Creates a new context wrapper with no theme and no base context. 58 * Creates a new context wrapper with the specified theme. 60 * The specified theme will be applied on top of the base context's theme. 61 * Any attributes not explicitly defined in the theme identified by 65 * @param themeResId the resource ID of the theme to be applied on top of 66 * the base context's theme 74 * Creates a new context wrapper with the specified theme. 76 * Unlike {@link #ContextThemeWrapper(Context, int)}, the theme passe 82 ContextThemeWrapper(Context base, Resources.Theme theme) argument 187 onApplyThemeResource(Resources.Theme theme, int resid, boolean first) argument [all...] |
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/template/ |
H A D | ButtonFooterMixin.java | 66 * @param theme Theme resource to be used for this button. Since this is applied as a theme, 72 public Button addButton(CharSequence text, @StyleRes int theme) { argument 73 Button button = createThemedButton(mContext, theme); 83 * @param theme Theme resource to be used for this button. Since this is applied as a theme, 89 public Button addButton(@StringRes int text, @StyleRes int theme) { argument 90 Button button = createThemedButton(mContext, theme); 168 private Button createThemedButton(Context context, @StyleRes int theme) { argument 171 LayoutInflater inflater = LayoutInflater.from(new ContextThemeWrapper(context, theme)); [all...] |
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/view/ |
H A D | NavigationBar.java | 52 // Normally we can automatically guess the theme by comparing the foreground color against 62 int theme = attributes.getResourceId(suwNavBarTheme, 0); 63 if (theme == 0) { 65 // theme is light-on-dark or dark-on-light. 71 theme = isDarkBg ? R.style.SuwNavBarThemeDark : R.style.SuwNavBarThemeLight; 74 return theme; 78 final int theme = getNavbarTheme(context); 79 return new ContextThemeWrapper(context, theme);
|
/frameworks/base/libs/androidfw/include/androidfw/ |
H A D | AttributeResolution.h | 45 bool ResolveAttrs(ResTable::Theme* theme, uint32_t def_style_attr, uint32_t def_style_res, 51 void ApplyStyle(ResTable::Theme* theme, ResXMLParser* xml_parser, uint32_t def_style_attr,
|
/frameworks/base/core/java/android/view/animation/ |
H A D | AccelerateInterpolator.java | 63 public AccelerateInterpolator(Resources res, Theme theme, AttributeSet attrs) { argument 65 if (theme != null) { 66 a = theme.obtainStyledAttributes(attrs, R.styleable.AccelerateInterpolator, 0, 0);
|
H A D | AnticipateInterpolator.java | 55 public AnticipateInterpolator(Resources res, Theme theme, AttributeSet attrs) { argument 57 if (theme != null) { 58 a = theme.obtainStyledAttributes(attrs, R.styleable.AnticipateInterpolator, 0, 0);
|
H A D | CycleInterpolator.java | 46 public CycleInterpolator(Resources resources, Theme theme, AttributeSet attrs) { argument 48 if (theme != null) { 49 a = theme.obtainStyledAttributes(attrs, R.styleable.CycleInterpolator, 0, 0);
|
H A D | DecelerateInterpolator.java | 56 public DecelerateInterpolator(Resources res, Theme theme, AttributeSet attrs) { argument 58 if (theme != null) { 59 a = theme.obtainStyledAttributes(attrs, R.styleable.DecelerateInterpolator, 0, 0);
|