Searched refs:theme (Results 1 - 25 of 163) sorted by relevance

1234567

/frameworks/base/libs/androidfw/tests/
H A DTheme_bench.cpp41 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 DTheme_test.cpp65 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); local
66 EXPECT_EQ(0u, theme->GetChangingConfigurations());
67 EXPECT_EQ(&assetmanager, theme->GetAssetManager());
71 EXPECT_EQ(kInvalidCookie, theme->GetAttribute(app::R::attr::attr_one, &value, &flags));
78 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); local
79 ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleOne));
85 cookie = theme->GetAttribute(app::R::attr::attr_one, &value, &flags);
91 cookie = theme->GetAttribute(app::R::attr::attr_two, &value, &flags);
102 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); local
103 ASSERT_TRUE(theme
135 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); local
147 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); local
181 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); local
216 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); local
[all...]
/frameworks/base/core/java/android/content/res/
H A DConfigurationBoundResourceCache.java33 * @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 DDrawableCache.java22 * 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 DConstantState.java58 * 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 DWallpaperSettingsActivity.java26 * 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/layoutlib/bridge/src/android/content/res/
H A DComplexColor_Accessor.java36 @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 DAssetManager_Delegate.java56 /*package*/ static void deleteTheme(AssetManager manager, long theme) { argument
57 Resources_Theme_Delegate.getDelegateManager().removeJavaReferenceFor(theme);
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/util/
H A DFallbackThemeWrapper.java25 * 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...]
H A DWizardManagerHelper.java53 public static final String EXTRA_THEME = "theme";
66 * theme used in setup wizard for Nougat MR1.
71 * Passed in a setup wizard intent as {@link #EXTRA_THEME}. This is the default theme used in
78 * theme used in setup wizard for O DR.
83 * Passed in a setup wizard intent as {@link #EXTRA_THEME}. This is the default theme used in
90 * theme used in setup wizard for P.
95 * Passed in a setup wizard intent as {@link #EXTRA_THEME}. This is the default theme used in
233 * Checks the intent whether the extra indicates that the light theme should be used or not. If
234 * the theme is not specified in the intent, or the theme specifie
254 isLightTheme(String theme, boolean def) argument
303 getThemeRes(String theme, @StyleRes int defaultTheme) argument
[all...]
/frameworks/support/v7/appcompat/src/main/java/androidx/appcompat/widget/
H A DThemedSpinnerAdapter.java34 * against a different theme than normal views.
36 * Classes that implement this interface should use the theme provided to
48 * @param theme the context against which to inflate drop-down views, or
49 * {@code null} to use the default theme
52 void setDropDownViewTheme(@Nullable Resources.Theme theme); argument
93 * public void setDropDownViewTheme(@Nullable Resources.Theme theme) {
94 * // Pass the new theme to the helper
95 * mDropDownHelper.setDropDownViewTheme(theme);
120 * @param theme the theme passe
123 setDropDownViewTheme(@ullable Resources.Theme theme) argument
[all...]
/frameworks/support/frameworks/support/samples/Support4Demos/src/main/java/com/example/android/supportv4/media/utils/
H A DResourceHelper.java30 * 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/main/java/com/example/android/supportv4/media/utils/
H A DResourceHelper.java30 * 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/av/packages/MediaComponents/src/com/android/media/update/
H A DApiHelper.java68 Theme theme = getLibResources(context).newTheme();
69 theme.applyStyle(themeId, true);
70 return theme;
77 public static LayoutInflater getLayoutInflater(Context context, Theme theme) { argument
78 if (theme == null) {
79 theme = getLibTheme(context);
82 // TODO (b/72975976): Avoid to use ContextThemeWrapper with app context and lib theme.
84 new ContextThemeWrapper(context, theme));
117 public static View inflateLibLayout(Context context, Theme theme, int libResId) { argument
118 return inflateLibLayout(context, theme, libResI
121 inflateLibLayout(Context context, Theme theme, int libResId, @Nullable ViewGroup root, boolean attachToRoot) argument
[all...]
/frameworks/base/core/java/android/widget/
H A DThemedSpinnerAdapter.java27 * 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 DResourceCursorAdapter.java106 * 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/layoutlib/studio-custom-widgets/src/com/android/tools/idea/editors/theme/widgets/
H A DPressedButton.java17 package com.android.tools.idea.editors.theme.widgets;
/frameworks/base/core/java/android/view/
H A DContextThemeWrapper.java27 * 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/main/java/androidx/appcompat/view/
H A DContextThemeWrapper.java31 * A context wrapper that allows you to modify or replace the theme of the wrapped context.
41 * Creates a new context wrapper with no theme and no base context.
52 * Creates a new context wrapper with the specified theme.
54 * The specified theme will be applied on top of the base context's theme.
55 * Any attributes not explicitly defined in the theme identified by
59 * @param themeResId the resource ID of the theme to be applied on top of
60 * the base context's theme
68 * Creates a new context wrapper with the specified theme.
70 * Unlike {@link #ContextThemeWrapper(Context, int)}, the theme passe
76 ContextThemeWrapper(Context base, Resources.Theme theme) argument
176 onApplyThemeResource(Resources.Theme theme, int resid, boolean first) argument
[all...]
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/template/
H A DButtonFooterMixin.java65 * @param theme Theme resource to be used for this button. Since this is applied as a theme,
71 public Button addButton(CharSequence text, @StyleRes int theme) { argument
72 Button button = createThemedButton(mContext, theme);
82 * @param theme Theme resource to be used for this button. Since this is applied as a theme,
88 public Button addButton(@StringRes int text, @StyleRes int theme) { argument
89 Button button = createThemedButton(mContext, theme);
167 private Button createThemedButton(Context context, @StyleRes int theme) { argument
170 LayoutInflater inflater = LayoutInflater.from(new ContextThemeWrapper(context, theme));
[all...]
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/view/
H A DNavigationBar.java52 // 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 DAttributeResolution.h46 bool ResolveAttrs(Theme* theme, uint32_t def_style_attr, uint32_t def_style_resid,
52 void ApplyStyle(Theme* theme, ResXMLParser* xml_parser, uint32_t def_style_attr,
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/
H A DItemLayoutTest.java66 for (int theme : themes) {
68 params.add(new Object[] { theme, layout });
78 public ItemLayoutTest(int theme, int layout) { argument
79 mContext = new ContextThemeWrapper(getTargetContext(), theme);
/frameworks/base/core/java/android/view/animation/
H A DAccelerateInterpolator.java63 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 DAnticipateInterpolator.java55 public AnticipateInterpolator(Resources res, Theme theme, AttributeSet attrs) { argument
57 if (theme != null) {
58 a = theme.obtainStyledAttributes(attrs, R.styleable.AnticipateInterpolator, 0, 0);

Completed in 1688 milliseconds

1234567