Home
last modified time | relevance | path

Searched refs:style (Results 1 – 25 of 477) sorted by relevance

12345678910>>...20

/frameworks/base/core/java/android/content/res/
DStringBlock.java32 import android.text.style.AbsoluteSizeSpan;
33 import android.text.style.BackgroundColorSpan;
34 import android.text.style.BulletSpan;
35 import android.text.style.CharacterStyle;
36 import android.text.style.ForegroundColorSpan;
37 import android.text.style.LineHeightSpan;
38 import android.text.style.RelativeSizeSpan;
39 import android.text.style.StrikethroughSpan;
40 import android.text.style.StyleSpan;
41 import android.text.style.SubscriptSpan;
[all …]
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/util/
DThemeResolverTest.java47 assertThat(themeResolver.resolve("material")).isEqualTo(R.style.SuwThemeMaterial); in resolve_nonDayNight_shouldReturnCorrespondingTheme()
48 assertThat(themeResolver.resolve("material_light")).isEqualTo(R.style.SuwThemeMaterial_Light); in resolve_nonDayNight_shouldReturnCorrespondingTheme()
49 assertThat(themeResolver.resolve("glif")).isEqualTo(R.style.SuwThemeGlif); in resolve_nonDayNight_shouldReturnCorrespondingTheme()
50 assertThat(themeResolver.resolve("glif_light")).isEqualTo(R.style.SuwThemeGlif_Light); in resolve_nonDayNight_shouldReturnCorrespondingTheme()
51 assertThat(themeResolver.resolve("glif_v2")).isEqualTo(R.style.SuwThemeGlifV2); in resolve_nonDayNight_shouldReturnCorrespondingTheme()
52 assertThat(themeResolver.resolve("glif_v2_light")).isEqualTo(R.style.SuwThemeGlifV2_Light); in resolve_nonDayNight_shouldReturnCorrespondingTheme()
53 assertThat(themeResolver.resolve("glif_v3")).isEqualTo(R.style.SuwThemeGlifV3); in resolve_nonDayNight_shouldReturnCorrespondingTheme()
54 assertThat(themeResolver.resolve("glif_v3_light")).isEqualTo(R.style.SuwThemeGlifV3_Light); in resolve_nonDayNight_shouldReturnCorrespondingTheme()
62 assertThat(themeResolver.resolve("material")).isEqualTo(R.style.SuwThemeMaterial_DayNight); in resolve_dayNight_shouldReturnDayNightTheme()
64 .isEqualTo(R.style.SuwThemeMaterial_DayNight); in resolve_dayNight_shouldReturnDayNightTheme()
[all …]
/frameworks/base/tools/aapt2/link/
DAutoVersioner_test.cpp87 …Style* style = test::GetValueForConfig<Style>(table.get(), "app:style/Foo", test::ParseConfigOrDie… in TEST() local
88 ASSERT_THAT(style, NotNull()); in TEST()
89 ASSERT_EQ(style->entries.size(), 1u); in TEST()
90 …EXPECT_EQ(make_value(test::ParseNameOrDie("android:attr/onClick")), style->entries.front().key.nam… in TEST()
92style = test::GetValueForConfig<Style>(table.get(), "app:style/Foo", test::ParseConfigOrDie("v13")… in TEST()
93 ASSERT_THAT(style, NotNull()); in TEST()
94 ASSERT_EQ(style->entries.size(), 2u); in TEST()
95 EXPECT_EQ(make_value(test::ParseNameOrDie("android:attr/onClick")),style->entries[0].key.name); in TEST()
96 …EXPECT_EQ(make_value(test::ParseNameOrDie("android:attr/requiresSmallestWidthDp")), style->entries… in TEST()
98style = test::GetValueForConfig<Style>(table.get(), "app:style/Foo", test::ParseConfigOrDie("v17")… in TEST()
[all …]
DReferenceLinker_test.cpp89 Style* style = test::GetValue<Style>(table.get(), "com.app.test:style/Theme"); in TEST() local
90 ASSERT_THAT(style, NotNull()); in TEST()
91 style->entries.back().value = in TEST()
120 Style* style = test::GetValue<Style>(table.get(), "com.app.test:style/Theme"); in TEST() local
121 ASSERT_THAT(style, NotNull()); in TEST()
122 ASSERT_TRUE(style->parent); in TEST()
123 ASSERT_TRUE(style->parent.value().id); in TEST()
124 EXPECT_EQ(ResourceId(0x01060000), style->parent.value().id.value()); in TEST()
126 ASSERT_EQ(2u, style->entries.size()); in TEST()
128 ASSERT_TRUE(style->entries[0].key.id); in TEST()
[all …]
DAutoVersioner.cpp92 if (Style* style = ValueCast<Style>(config_value->value.get())) { in Consume() local
96 auto iter = style->entries.begin(); in Consume()
97 while (iter != style->entries.end()) { in Consume()
115 iter = style->entries.erase(iter); in Consume()
132 std::unique_ptr<Style> new_style(style->Transform(cloner)); in Consume()
133 new_style->SetComment(style->GetComment()); in Consume()
134 new_style->SetSource(style->GetSource()); in Consume()
/frameworks/base/tools/aapt2/
DValueVisitor_test.cpp43 void Visit(Style* style) override { in Visit()
44 visited_style = style; in Visit()
45 DescendingValueVisitor::Visit(style); in Visit()
58 std::unique_ptr<Style> style = in TEST() local
65 style->Accept(&visitor); in TEST()
67 ASSERT_EQ(style.get(), visitor.visited_style); in TEST()
71 ASSERT_EQ(style->entries.size() + 2, visitor.visited_refs.size()); in TEST()
78 std::unique_ptr<Style> style = in TEST() local
83 EXPECT_NE(ValueCast<Style>(style.get()), nullptr); in TEST()
84 EXPECT_EQ(ValueCast<Reference>(style.get()), nullptr); in TEST()
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/util/
DThemeResolver.java38 .setDefaultTheme(R.style.SuwThemeGlif_DayNight) in getDefault()
107 return R.style.SuwThemeGlifV3_DayNight; in getDayNightThemeRes()
110 return R.style.SuwThemeGlifV2_DayNight; in getDayNightThemeRes()
113 return R.style.SuwThemeGlif_DayNight; in getDayNightThemeRes()
116 return R.style.SuwThemeMaterial_DayNight; in getDayNightThemeRes()
133 return R.style.SuwThemeGlifV3_Light; in getThemeRes()
135 return R.style.SuwThemeGlifV3; in getThemeRes()
137 return R.style.SuwThemeGlifV2_Light; in getThemeRes()
139 return R.style.SuwThemeGlifV2; in getThemeRes()
141 return R.style.SuwThemeGlif_Light; in getThemeRes()
[all …]
/frameworks/base/core/java/android/text/
DHtml.java27 import android.text.style.AbsoluteSizeSpan;
28 import android.text.style.AlignmentSpan;
29 import android.text.style.BackgroundColorSpan;
30 import android.text.style.BulletSpan;
31 import android.text.style.CharacterStyle;
32 import android.text.style.ForegroundColorSpan;
33 import android.text.style.ImageSpan;
34 import android.text.style.ParagraphStyle;
35 import android.text.style.QuoteSpan;
36 import android.text.style.RelativeSizeSpan;
[all …]
/frameworks/base/libs/input/
DSpriteIcon.h29 inline SpriteIcon() : style(0), hotSpotX(0), hotSpotY(0) {} in SpriteIcon()
30 inline SpriteIcon(const graphics::Bitmap& bitmap, int32_t style, float hotSpotX, float hotSpotY) in SpriteIcon()
31 : bitmap(bitmap), style(style), hotSpotX(hotSpotX), hotSpotY(hotSpotY) {} in SpriteIcon()
34 int32_t style; member
39 return SpriteIcon(bitmap.copy(ANDROID_BITMAP_FORMAT_RGBA_8888), style, hotSpotX, hotSpotY); in copy()
44 style = 0; in reset()
/frameworks/base/core/tests/coretests/src/android/text/
DSpannedTest.java24 import android.text.style.CharacterStyle;
25 import android.text.style.StyleSpan;
26 import android.text.style.TextAppearanceSpan;
27 import android.text.style.TypefaceSpan;
91 StyleSpan[] style; in testWrapParcel() local
93 style = s2.getSpans(1, 2, StyleSpan.class); in testWrapParcel()
94 assertEquals(1, style.length); in testWrapParcel()
95 assertEquals(1, s2.getSpanStart(style[0])); in testWrapParcel()
96 assertEquals(2, s2.getSpanEnd(style[0])); in testWrapParcel()
98 style = s2.getSpans(3, 7, StyleSpan.class); in testWrapParcel()
[all …]
/frameworks/minikin/include/minikin/
DFont.h76 Builder& setStyle(FontStyle style) { in setStyle() argument
77 mWeight = style.weight(); in setStyle()
78 mSlant = style.slant(); in setStyle()
123 FontStyle style = FontStyle(reader); in readFrom() local
127 new Font(style, typefaceMetadataReader, typefaceLoader, localeListId)); in readFrom()
140 inline FontStyle style() const { return mStyle; } in style() function
148 Font(std::shared_ptr<MinikinFont>&& typeface, FontStyle style, HbFontUniquePtr&& baseFont, in Font() argument
151 mStyle(style), in Font()
156 Font(FontStyle style, BufferReader typefaceMetadataReader, TypefaceLoader* typefaceLoader, in Font() argument
158 : mStyle(style), in Font()
/frameworks/layoutlib/bridge/src/android/graphics/
DTypeface_Delegate.java92 @NonNull FontFamily_Builder_Delegate[] fontFamilyBuilders, int style, in Typeface_Delegate() argument
96 mStyle = style; in Typeface_Delegate()
107 /*package*/ static synchronized long nativeCreateFromTypeface(long native_instance, int style) { in nativeCreateFromTypeface() argument
117 new Typeface_Delegate(delegate.mFontFamilies, delegate.mFontFamilyBuilders, style, in nativeCreateFromTypeface()
132 int style = weight >= 600 ? (italic ? Typeface.BOLD_ITALIC : Typeface.BOLD) : in nativeCreateFromTypefaceWithExactStyle() local
135 new Typeface_Delegate(delegate.mFontFamilies, delegate.mFontFamilyBuilders, style, in nativeCreateFromTypefaceWithExactStyle()
191 int style = weight >= 600 ? (italic == 1 ? Typeface.BOLD_ITALIC : Typeface.BOLD) : in nativeCreateFromArray() local
196 style, weight); in nativeCreateFromArray()
287 /*package*/ static Typeface create(String familyName, int style) { in create() argument
294 return Typeface.create_Original(familyName, style); in create()
[all …]
DBaseCanvas_Delegate.java226 int style = paintDelegate.getStyle(); in nDrawRect()
229 if (style == Paint.Style.FILL.nativeInt || in nDrawRect()
230 style == Paint.Style.FILL_AND_STROKE.nativeInt) { in nDrawRect()
235 if (style == Paint.Style.STROKE.nativeInt || in nDrawRect()
236 style == Paint.Style.FILL_AND_STROKE.nativeInt) { in nDrawRect()
249 int style = paintDelegate.getStyle(); in nDrawOval()
252 if (style == Paint.Style.FILL.nativeInt || in nDrawOval()
253 style == Paint.Style.FILL_AND_STROKE.nativeInt) { in nDrawOval()
258 if (style == Paint.Style.STROKE.nativeInt || in nDrawOval()
259 style == Paint.Style.FILL_AND_STROKE.nativeInt) { in nDrawOval()
[all …]
/frameworks/base/core/jni/
Dandroid_view_PointerIcon.h70 int32_t style; member
78 return style == POINTER_ICON_STYLE_NULL; in isNullIcon()
82 style = POINTER_ICON_STYLE_NULL; in reset()
93 jobject contextObj, int32_t style);
108 jobject contextObj, int32_t style, PointerIcon* outPointerIcon);
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/
DItemLayoutTest.java48 R.style.SuwThemeMaterial_Light, in data()
49 R.style.SuwThemeMaterial, in data()
50 R.style.SuwThemeGlif_Light, in data()
51 R.style.SuwThemeGlif, in data()
52 R.style.SuwThemeGlifV2_Light, in data()
53 R.style.SuwThemeGlifV2 in data()
/frameworks/base/core/tests/coretests/src/com/android/internal/policy/
DPhoneWindowTest.java63 createPhoneWindowWithTheme(R.style.LayoutInDisplayCutoutModeUnset); in layoutInDisplayCutoutMode_unset()
72 createPhoneWindowWithTheme(R.style.LayoutInDisplayCutoutModeDefault); in layoutInDisplayCutoutMode_default()
81 createPhoneWindowWithTheme(R.style.LayoutInDisplayCutoutModeShortEdges); in layoutInDisplayCutoutMode_shortEdges()
90 createPhoneWindowWithTheme(R.style.LayoutInDisplayCutoutModeNever); in layoutInDisplayCutoutMode_never()
99 createPhoneWindowWithTheme(R.style.LayoutInDisplayCutoutModeAlways); in layoutInDisplayCutoutMode_always()
108 createPhoneWindowWithTheme(R.style.WindowBackgroundColorLiteral); in testWindowBackground_colorLiteral()
120 createPhoneWindowWithTheme(R.style.WindowBackgroundFallbackColorLiteral); in testWindowBackgroundFallback_colorLiteral()
134 createPhoneWindowWithTheme(R.style.WindowBackgroundFallbackColorLiteral); in testWindowBackgroundFallbackWithExplicitBackgroundSet_colorLiteral()
/frameworks/base/libs/androidfw/tests/
DTheme_test.cpp78 ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleOne).has_value()); in TEST_F()
98 ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleTwo).has_value()); in TEST_F()
127 ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleTwo).has_value()); in TEST_F()
136 ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleTwo).has_value()); in TEST_F()
137 ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleThree).has_value()); in TEST_F()
166 ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleTwo).has_value()); in TEST_F()
167 ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleThree, true /* force */).has_value()); in TEST_F()
197 ASSERT_TRUE(theme->ApplyStyle(libclient::R::style::Theme, false /*force*/).has_value()); in TEST_F()
222 ASSERT_TRUE(theme_one->ApplyStyle(app::R::style::StyleOne).has_value()); in TEST_F()
235 ASSERT_TRUE(theme_two->ApplyStyle(app::R::style::StyleThree).has_value()); in TEST_F()
[all …]
/frameworks/base/core/java/android/text/style/
DTypefaceSpan.java17 package android.text.style;
164 int style; in applyFontFamily() local
167 style = Typeface.NORMAL; in applyFontFamily()
169 style = old.getStyle(); in applyFontFamily()
171 final Typeface styledTypeface = Typeface.create(family, style); in applyFontFamily()
172 int fake = style & ~styledTypeface.getStyle(); in applyFontFamily()
DTextAppearanceSpan.java17 package android.text.style;
195 a = context.obtainStyledAttributes(com.android.internal.R.style.Theme, in TextAppearanceSpan()
209 public TextAppearanceSpan(String family, int style, int size, in TextAppearanceSpan() argument
212 mStyle = style; in TextAppearanceSpan()
465 int style = 0; in updateMeasureState() local
468 style = mStyle; in updateMeasureState()
469 styledTypeface = Typeface.create(mTypeface, style); in updateMeasureState()
474 style = tf.getStyle(); in updateMeasureState()
477 style |= mStyle; in updateMeasureState()
480 styledTypeface = Typeface.create(mFamilyName, style); in updateMeasureState()
[all …]
DStyleSpan.java17 package android.text.style;
56 public StyleSpan(int style) { in StyleSpan() argument
57 mStyle = style; in StyleSpan()
113 private static void apply(Paint paint, int style) { in apply() argument
123 int want = oldStyle | style; in apply()
/frameworks/base/core/tests/coretests/src/android/graphics/
DTypefaceTest.java78 for (int style : STYLES) { in testDefaults()
79 String msg = "style = " + style; in testDefaults()
80 assertNotNull(msg, Typeface.defaultFromStyle(style)); in testDefaults()
81 assertEquals(msg, style, Typeface.defaultFromStyle(style).getStyle()); in testDefaults()
163 final int style = random.nextInt(3); in testMultithreadCacheStressTest()
164 final Typeface result = Typeface.create(base, style); in testMultithreadCacheStressTest()
165 assertEquals(style, result.getStyle()); in testMultithreadCacheStressTest()
240 for (int style : STYLES) { in testSetSystemFontMap()
241 String msg = "style = " + style; in testSetSystemFontMap()
242 assertNotNull(msg, Typeface.defaultFromStyle(style)); in testSetSystemFontMap()
[all …]
DFontFileUtilTest.java107 for (Pair<Integer, Boolean> style : FontTestUtil.getAllStyles()) { in testRegularFonts()
108 int weight = style.first.intValue(); in testRegularFonts()
109 boolean italic = style.second.booleanValue(); in testRegularFonts()
124 for (Pair<Integer, Boolean> style : FontTestUtil.getAllStyles()) { in testTtcFont()
125 int weight = style.first.intValue(); in testTtcFont()
126 boolean italic = style.second.booleanValue(); in testTtcFont()
140 for (Pair<Integer, Boolean> style : FontTestUtil.getAllStyles()) { in testVariationFont()
141 int weight = style.first.intValue(); in testVariationFont()
142 boolean italic = style.second.booleanValue(); in testVariationFont()
/frameworks/base/core/java/android/text/format/
DRelativeDateTimeFormatter.java126 android.icu.text.RelativeDateTimeFormatter.Style style; in getRelativeTimeSpanString() local
128 style = android.icu.text.RelativeDateTimeFormatter.Style.SHORT; in getRelativeTimeSpanString()
130 style = android.icu.text.RelativeDateTimeFormatter.Style.LONG; in getRelativeTimeSpanString()
174 str = getFormatter(icuLocale, style, displayContext).format( in getRelativeTimeSpanString()
180 str = getFormatter(icuLocale, style, displayContext).format( in getRelativeTimeSpanString()
227 getFormatter(icuLocale, style, displayContext); in getRelativeTimeSpanString()
277 android.icu.text.RelativeDateTimeFormatter.Style style; in getRelativeDateTimeString() local
279 style = android.icu.text.RelativeDateTimeFormatter.Style.SHORT; in getRelativeDateTimeString()
281 style = android.icu.text.RelativeDateTimeFormatter.Style.LONG; in getRelativeDateTimeString()
325 return getFormatter(icuLocale, style, capitalizationContext) in getRelativeDateTimeString()
[all …]
/frameworks/base/core/java/com/android/internal/widget/
DSubtitleView.java271 final CaptionStyle style; in setStyle() local
273 style = CaptionStyle.getCustomStyle(cr); in setStyle()
275 style = CaptionStyle.PRESETS[styleId]; in setStyle()
279 mForegroundColor = style.hasForegroundColor() ? in setStyle()
280 style.foregroundColor : defStyle.foregroundColor; in setStyle()
281 mBackgroundColor = style.hasBackgroundColor() ? in setStyle()
282 style.backgroundColor : defStyle.backgroundColor; in setStyle()
283 mEdgeType = style.hasEdgeType() ? style.edgeType : defStyle.edgeType; in setStyle()
284 mEdgeColor = style.hasEdgeColor() ? style.edgeColor : defStyle.edgeColor; in setStyle()
287 final Typeface typeface = style.getTypeface(); in setStyle()
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/template/
DButtonFooterMixinTest.java70 final Button button = mixin.addButton("foobar", R.style.SuwGlifButton_Primary); in testAddButton()
88 mixin.addButton(R.string.suw_next_button_label, R.style.SuwGlifButton_Primary); in testAddButtonTextRes()
104 mixin.addButton("foo", R.style.SuwGlifButton_Secondary); in testAddSpace()
106 mixin.addButton("bar", R.style.SuwGlifButton_Primary); in testAddSpace()
120 final Button fooButton = mixin.addButton("foo", R.style.SuwGlifButton_Secondary); in testRemoveButton()
121 final Button barButton = mixin.addButton("bar", R.style.SuwGlifButton_Secondary); in testRemoveButton()
137 final Button fooButton = mixin.addButton("foo", R.style.SuwGlifButton_Secondary); in testRemoveSpace()
154 final Button fooButton = mixin.addButton("foo", R.style.SuwGlifButton_Secondary); in testRemoveAllViews()

12345678910>>...20