Home | History | Annotate | Download | only in cts

Lines Matching refs:theme

25 import android.content.res.Resources.Theme;
42 private Resources.Theme mResTheme;
57 final Theme other = getContext().getTheme();
104 Resources.Theme theme = getContext().getResources().newTheme();
106 0, theme.getChangingConfigurations());
108 theme.applyStyle(R.style.Theme_OrientationDependent, true);
109 assertEquals("First call to Theme.applyStyle() sets changing configuration",
110 ActivityInfo.CONFIG_ORIENTATION, theme.getChangingConfigurations());
112 theme.applyStyle(R.style.Theme_LayoutDirectionDependent, true);
113 assertEquals("Multiple calls to Theme.applyStyle() update changing configuration",
115 theme.getChangingConfigurations());
117 Resources.Theme other = getContext().getResources().newTheme();
118 other.setTo(theme);
119 assertEquals("Theme.setTheme() copies changing confguration",
121 theme.getChangingConfigurations());
131 assertEquals("Theme will be created in LTR config",
134 Resources.Theme theme = res.newTheme();
135 theme.applyStyle(R.style.Theme_LayoutIsRTL, true);
137 TypedArray t = theme.obtainStyledAttributes(new int[] { R.attr.themeBoolean });
138 assertEquals("Theme was created in LTR config", false, t.getBoolean(0, true));
144 assertEquals("Theme will be rebased in RTL config",
147 theme.rebase();
149 t = theme.obtainStyledAttributes(new int[] { R.attr.themeBoolean });
150 assertEquals("Theme was rebased in RTL config", true, t.getBoolean(0, false));
157 final Theme theme = res.newTheme();
158 theme.applyStyle(R.style.Theme_ThemedDrawableTest, true);
160 final ColorDrawable dr = (ColorDrawable) theme.getDrawable(R.drawable.colordrawable_themed);
167 final Theme theme = res.newTheme();
168 assertSame(res, theme.getResources());
174 final Theme theme = res.newTheme();
176 theme.applyStyle(R.style.Theme_Empty, false /*force*/);
179 assertTrue(theme.resolveAttribute(R.attr.type1, tv, false));
184 theme.applyStyle(R.style.Whatever, false /*force*/);
185 assertTrue(theme.resolveAttribute(R.attr.type1, tv, false));
190 theme.applyStyle(R.style.Whatever, true /*force*/);
191 assertTrue(theme.resolveAttribute(R.attr.type1, tv, false));