Home
last modified time | relevance | path

Searched refs:theme (Results 1 – 25 of 273) sorted by relevance

1234567891011

/aosp14/frameworks/base/libs/androidfw/tests/
H A DTheme_test.cpp67 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); in TEST_F() local
68 EXPECT_EQ(0u, theme->GetChangingConfigurations()); in TEST_F()
69 EXPECT_EQ(&assetmanager, theme->GetAssetManager()); in TEST_F()
77 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); in TEST_F() local
86 value = theme->GetAttribute(app::R::attr::attr_two); in TEST_F()
106 value = theme->GetAttribute(app::R::attr::attr_two); in TEST_F()
128 ASSERT_FALSE(theme->GetAttribute(0x7f000001)); in TEST_F()
147 value = theme->GetAttribute(app::R::attr::attr_six); in TEST_F()
154 value = theme->GetAttribute(app::R::attr::attr_five); in TEST_F()
177 value = theme->GetAttribute(app::R::attr::attr_six); in TEST_F()
[all …]
H A DTheme_bench.cpp41 auto theme = assets.NewTheme(); in BM_ThemeApplyStyleFramework() local
42 theme->ApplyStyle(kStyleId, false /* force */); in BM_ThemeApplyStyleFramework()
58 std::unique_ptr<ResTable::Theme> theme{new ResTable::Theme(res_table)}; in BM_ThemeApplyStyleFrameworkOld() local
59 theme->applyStyle(kStyleId, false /* force */); in BM_ThemeApplyStyleFrameworkOld()
70 auto theme = assets.NewTheme(); in BM_ThemeGetAttribute() local
71 theme->ApplyStyle(kStyleId, false /* force */); in BM_ThemeGetAttribute()
74 theme->GetAttribute(kAttrId); in BM_ThemeGetAttribute()
84 std::unique_ptr<ResTable::Theme> theme{new ResTable::Theme(res_table)}; in BM_ThemeGetAttributeOld() local
85 theme->applyStyle(kStyleId, false /* force */); in BM_ThemeGetAttributeOld()
91 theme->getAttribute(kAttrId, &value, &flags); in BM_ThemeGetAttributeOld()
H A DAttributeResolution_bench.cpp65 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); in BM_ApplyStyle() local
66 theme->ApplyStyle(app::R::style::StyleTwo); in BM_ApplyStyle()
75 ApplyStyle(theme.get(), &xml_tree, 0u /*def_style_attr*/, 0u /*def_style_res*/, attrs.data(), in BM_ApplyStyle()
138 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); in BM_ApplyStyleFramework() local
139 theme->ApplyStyle(Theme_Material_Light); in BM_ApplyStyleFramework()
160 ApplyStyle(theme.get(), &xml_tree, 0x01010084u /*def_style_attr*/, 0u /*def_style_res*/, in BM_ApplyStyleFramework()
/aosp14/frameworks/base/core/java/android/app/
H A DPresentation.java192 public Presentation(Context outerContext, Display display, int theme) { in Presentation() argument
193 this(outerContext, display, theme, INVALID_WINDOW_TYPE); in Presentation()
217 public Presentation(@NonNull Context outerContext, @NonNull Display display, int theme, in Presentation() argument
219 super(createPresentationContext(outerContext, display, theme, type), theme, false); in Presentation() local
314 int theme) { in createPresentationContext() argument
315 return createPresentationContext(outerContext, display, theme, INVALID_WINDOW_TYPE); in createPresentationContext()
319 Context outerContext, Display display, int theme, @WindowType int type) { in createPresentationContext() argument
329 if (theme == 0) { in createPresentationContext()
333 theme = outValue.resourceId; in createPresentationContext()
335 return new ContextThemeWrapper(windowContext, theme); in createPresentationContext()
/aosp14/frameworks/base/core/java/android/view/
H A DContextThemeWrapper.java80 public ContextThemeWrapper(Context base, Resources.Theme theme) { in ContextThemeWrapper() argument
82 mTheme = theme; in ContextThemeWrapper()
156 public void setTheme(@Nullable Resources.Theme theme) { in setTheme() argument
157 mTheme = theme; in setTheme()
202 protected void onApplyThemeResource(Resources.Theme theme, int resId, boolean first) { in onApplyThemeResource() argument
203 theme.applyStyle(resId, true); in onApplyThemeResource()
211 final Resources.Theme theme = getBaseContext().getTheme(); in initializeTheme() local
212 if (theme != null) { in initializeTheme()
213 mTheme.setTo(theme); in initializeTheme()
/aosp14/frameworks/base/libs/androidfw/
H A DAttributeResolution.cpp66 base::expected<const ResolvedBag*, NullOrIOError> GetStyleBag(Theme* theme, in GetStyleBag() argument
75 auto result = theme->GetAssetManager()->ResolveBag(*value); in GetStyleBag()
84 return theme->GetAssetManager()->GetBag(fallback_resid); in GetStyleBag()
108 return theme->GetAssetManager()->ResolveBag(*result); in GetXmlStyleBag()
113 return theme->GetAssetManager()->GetBag(value.data); in GetXmlStyleBag()
130 const AssetManager2* assetmanager = theme->GetAssetManager(); in ResolveAttrs()
169 const auto result = theme->ResolveAttributeReference(value); in ResolveAttrs()
176 if (auto attr_value = theme->GetAttribute(cur_ident)) { in ResolveAttrs()
229 const AssetManager2* assetmanager = theme->GetAssetManager(); in ApplyStyle()
301 auto result = theme->ResolveAttributeReference(value); in ApplyStyle()
[all …]
/aosp14/frameworks/base/packages/SystemUI/compose/core/src/com/android/compose/theme/
H A DPlatformTheme.kt17 package com.android.compose.theme
27 import com.android.compose.theme.typography.TypeScaleTokens
28 import com.android.compose.theme.typography.TypefaceNames
29 import com.android.compose.theme.typography.TypefaceTokens
30 import com.android.compose.theme.typography.TypographyTokens
31 import com.android.compose.theme.typography.platformTypography
/aosp14/frameworks/base/packages/CredentialManager/src/com/android/credentialmanager/ui/theme/
H A DPlatformTheme.kt17 package com.android.credentialmanager.ui.theme
27 import com.android.credentialmanager.ui.theme.typography.TypeScaleTokens
28 import com.android.credentialmanager.ui.theme.typography.TypefaceNames
29 import com.android.credentialmanager.ui.theme.typography.TypefaceTokens
30 import com.android.credentialmanager.ui.theme.typography.TypographyTokens
31 import com.android.credentialmanager.ui.theme.typography.platformTypography
/aosp14/frameworks/base/core/java/com/android/internal/app/
H A DMediaRouteDialogPresenter.java72 int theme = MediaRouteChooserDialog.isLightTheme(context) in createDialog() local
75 return createDialog(context, routeTypes, extendedSettingsClickListener, theme); in createDialog()
80 int routeTypes, View.OnClickListener extendedSettingsClickListener, int theme) { in createDialog() argument
81 return createDialog(context, routeTypes, extendedSettingsClickListener, theme, in createDialog()
87 View.OnClickListener extendedSettingsClickListener, int theme, in createDialog() argument
93 final MediaRouteChooserDialog d = new MediaRouteChooserDialog(context, theme, in createDialog()
99 return new MediaRouteControllerDialog(context, theme); in createDialog()
/aosp14/frameworks/base/core/java/android/animation/
H A DAnimatorInflater.java106 return loadAnimator(resources, theme, id, 1); in loadAnimator()
137 animator = constantState.newInstance(resources, theme); in loadAnimator()
163 final Theme theme = context.getTheme(); in loadStateListAnimator() local
179 cache.put(id, theme, constantState, cacheGeneration); in loadStateListAnimator()
676 if (theme != null) { in createAnimatorFromXml()
736 if (theme != null) { in loadValues()
780 if (theme != null) { in inferValueTypeOfKeyframe()
961 if (theme != null) { in loadKeyframe()
1014 loadAnimator(res, theme, attrs, anim, pathErrorScale); in loadObjectAnimator()
1034 if (theme != null) { in loadAnimator()
[all …]
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/theme/
H A DThemeOverlayApplierTest.java16 package com.android.systemui.theme;
18 import static com.android.systemui.theme.ThemeOverlayApplier.ANDROID_PACKAGE;
19 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_ACCENT_COLOR;
21 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_FONT;
22 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_ICON_ANDROID;
25 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_ICON_SYSUI;
27 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_SHAPE;
29 import static com.android.systemui.theme.ThemeOverlayApplier.SETTINGS_PACKAGE;
30 import static com.android.systemui.theme.ThemeOverlayApplier.SYSTEM_USER_CATEGORIES;
31 import static com.android.systemui.theme.ThemeOverlayApplier.SYSUI_PACKAGE;
[all …]
/aosp14/frameworks/base/core/java/com/android/internal/graphics/drawable/
H A DAnimationScaleListDrawable.java78 @NonNull AttributeSet attrs, @Nullable Theme theme) in inflate() argument
80 final TypedArray a = obtainAttributes(r, theme, attrs, in inflate()
85 inflateChildElements(r, parser, attrs, theme); in inflate()
94 @NonNull AttributeSet attrs, @Nullable Theme theme) in inflateChildElements() argument
112 final TypedArray a = obtainAttributes(r, theme, attrs, in inflateChildElements()
127 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in inflateChildElements()
239 public void applyTheme(@NonNull Theme theme) { in applyTheme() argument
240 super.applyTheme(theme); in applyTheme()
/aosp14/frameworks/base/core/java/android/widget/
H A DResourceCursorAdapter.java114 public void setDropDownViewTheme(Resources.Theme theme) { in setDropDownViewTheme() argument
115 super.setDropDownViewTheme(theme); in setDropDownViewTheme()
117 if (theme == null) { in setDropDownViewTheme()
119 } else if (theme == mInflater.getContext().getTheme()) { in setDropDownViewTheme()
122 final Context context = new ContextThemeWrapper(mContext, theme); in setDropDownViewTheme()
/aosp14/frameworks/base/graphics/java/android/graphics/drawable/
H A DLevelListDrawable.java88 public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme) in inflate() argument
90 super.inflate(r, parser, attrs, theme); in inflate()
93 inflateChildElements(r, parser, attrs, theme); in inflate()
97 Theme theme) throws XmlPullParserException, IOException { in inflateChildElements() argument
115 TypedArray a = obtainAttributes(r, theme, attrs, in inflateChildElements()
134 dr = r.getDrawable(drawableRes, theme); in inflateChildElements()
144 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in inflateChildElements()
H A DDrawableInflater.java77 @Nullable Theme theme, @DrawableRes int id) { in loadDrawable() argument
78 return resources.getDrawable(id, theme); in loadDrawable()
113 @NonNull AttributeSet attrs, @Nullable Theme theme) in inflateFromXml() argument
115 return inflateFromXmlForDensity(name, parser, attrs, 0, theme); in inflateFromXml()
123 @NonNull AttributeSet attrs, int density, @Nullable Theme theme) in inflateFromXmlForDensity() argument
141 drawable.inflate(mRes, parser, attrs, theme); in inflateFromXmlForDensity()
H A DAnimatedStateListDrawable.java379 @NonNull AttributeSet attrs, @Nullable Theme theme) in inflate() argument
388 inflateChildElements(r, parser, attrs, theme); in inflate()
394 public void applyTheme(@Nullable Theme theme) { in applyTheme() argument
395 super.applyTheme(theme); in applyTheme()
402 final TypedArray a = theme.resolveAttributes( in applyTheme()
456 parseItem(r, parser, attrs, theme); in inflateChildElements()
458 parseTransition(r, parser, attrs, theme); in inflateChildElements()
464 @NonNull AttributeSet attrs, @Nullable Theme theme) in parseTransition() argument
468 final TypedArray a = obtainAttributes(r, theme, attrs, in parseTransition()
500 @NonNull AttributeSet attrs, @Nullable Theme theme) in parseItem() argument
[all …]
H A DStateListDrawable.java118 public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme) in inflate() argument
120 final TypedArray a = obtainAttributes(r, theme, attrs, R.styleable.StateListDrawable); in inflate()
126 inflateChildElements(r, parser, attrs, theme); in inflate()
162 Theme theme) throws XmlPullParserException, IOException { in inflateChildElements() argument
180 final TypedArray a = obtainAttributes(r, theme, attrs, in inflateChildElements()
199 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in inflateChildElements()
383 public void applyTheme(Theme theme) { in applyTheme() argument
384 super.applyTheme(theme); in applyTheme()
/aosp14/frameworks/base/core/java/android/view/animation/
H A DAnimationUtils.java353 public static Interpolator loadInterpolator(Resources res, Theme theme, int id) in loadInterpolator() argument
358 return createInterpolatorFromXml(res, theme, parser); in loadInterpolator()
371 Resources res, Theme theme, XmlPullParser parser) in createInterpolatorFromXml() argument
394 interpolator = new AccelerateInterpolator(res, theme, attrs); in createInterpolatorFromXml()
396 interpolator = new DecelerateInterpolator(res, theme, attrs); in createInterpolatorFromXml()
400 interpolator = new CycleInterpolator(res, theme, attrs); in createInterpolatorFromXml()
402 interpolator = new AnticipateInterpolator(res, theme, attrs); in createInterpolatorFromXml()
404 interpolator = new OvershootInterpolator(res, theme, attrs); in createInterpolatorFromXml()
406 interpolator = new AnticipateOvershootInterpolator(res, theme, attrs); in createInterpolatorFromXml()
410 interpolator = new PathInterpolator(res, theme, attrs); in createInterpolatorFromXml()
/aosp14/frameworks/base/core/java/android/content/res/
H A DThemedResourceCache.java53 public void put(long key, @Nullable Theme theme, @NonNull T entry, int generation) { in put() argument
54 put(key, theme, entry, generation, true); in put()
68 public void put(long key, @Nullable Theme theme, @NonNull T entry, int generation, in put() argument
79 entries = getThemedLocked(theme, true); in put()
105 public T get(long key, @Nullable Theme theme) { in get() argument
111 final LongSparseArray<WeakReference<T>> themedEntries = getThemedLocked(theme, false); in get()
H A DConfigurationBoundResourceCache.java43 public T getInstance(long key, Resources resources, Resources.Theme theme) { in getInstance() argument
44 final ConstantState<T> entry = get(key, theme); in getInstance()
46 return entry.newInstance(resources, theme); in getInstance()
H A DDrawableCache.java42 public Drawable getInstance(long key, Resources resources, Resources.Theme theme) { in getInstance() argument
43 final Drawable.ConstantState entry = get(key, theme); in getInstance()
45 return entry.newDrawable(resources, theme); in getInstance()
/aosp14/frameworks/base/core/java/android/service/wallpaper/
H A DWallpaperSettingsActivity.java40 Resources.Theme theme = getTheme(); in onCreate() local
42 theme.applyStyle(com.android.internal.R.style.PreviewWallpaperSettings, true); in onCreate()
44 theme.applyStyle(com.android.internal.R.style.ActiveWallpaperSettings, true); in onCreate()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/theme/
H A DThemeOverlayController.java17 package com.android.systemui.theme;
22 import static com.android.systemui.theme.ThemeOverlayApplier.COLOR_SOURCE_HOME;
23 import static com.android.systemui.theme.ThemeOverlayApplier.COLOR_SOURCE_LOCK;
24 import static com.android.systemui.theme.ThemeOverlayApplier.COLOR_SOURCE_PRESET;
28 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_COLOR_BOTH;
29 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_COLOR_INDEX;
30 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_COLOR_SOURCE;
31 import static com.android.systemui.theme.ThemeOverlayApplier.TIMESTAMP_FIELD;
668 Resources.Theme theme = mContext.getTheme(); in colorSchemeIsApplied() local
670 if (!(res.getColor(android.R.color.system_accent1_500, theme) in colorSchemeIsApplied()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/content/res/
H A DConfigurationBoundResourceCacheTest.java183 final Resources.Theme theme = i == 0 ? getActivity().getTheme() : null; in testConfigChangeMultipleThemes() local
184 mCache.put(R.dimen.resource_cache_test_generic, theme, in testConfigChangeMultipleThemes()
187 mCache.put(R.dimen.resource_cache_test_orientation_dependent, theme, in testConfigChangeMultipleThemes()
199 final Resources.Theme theme = i == 0 ? getActivity().getTheme() : null; in testConfigChangeMultipleThemes() local
201 mCache.getInstance(R.dimen.resource_cache_test_generic, res, theme)); in testConfigChangeMultipleThemes()
204 theme)); in testConfigChangeMultipleThemes()
208 final Resources.Theme theme = i == 0 ? getActivity().getTheme() : null; in testConfigChangeMultipleThemes() local
210 mCache.getInstance(R.dimen.resource_cache_test_generic, res, theme)); in testConfigChangeMultipleThemes()
212 theme)); in testConfigChangeMultipleThemes()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
H A DAlphaTintDrawableWrapper.java67 @NonNull AttributeSet attrs, @Nullable Theme theme) in inflate() argument
69 final TypedArray a = obtainAttributes(r, theme, attrs, in inflate()
72 super.inflate(r, parser, attrs, theme); in inflate()
157 public Drawable newDrawable(Resources res, Theme theme) { in newDrawable() argument
158 DrawableWrapper wrapper = (DrawableWrapper) mWrappedState.newDrawable(res, theme); in newDrawable()

1234567891011