Lines Matching refs:layout

68         GlifLayout layout = new GlifLayout(mContext);
69 assertDefaultTemplateInflated(layout);
74 GlifLayout layout = new GlifLayout(mContext);
75 TextView title = (TextView) layout.findViewById(R.id.suw_layout_title);
76 layout.setHeaderText("Abracadabra");
83 GlifLayout layout = new GlifLayout(mContext);
86 layout.addView(tv);
87 assertDefaultTemplateInflated(layout);
88 View view = layout.findViewById(testViewId);
94 GlifLayout layout = new GlifLayout(mContext);
96 layout.getScrollView());
101 GlifLayout layout = new GlifLayout(mContext);
102 layout.setProgressBarShown(true);
103 layout.setPrimaryColor(ColorStateList.valueOf(Color.RED));
105 ColorStateList.valueOf(Color.RED), layout.getPrimaryColor());
108 ProgressBar progressBar = (ProgressBar) layout.findViewById(R.id.suw_layout_progress);
119 GlifLayout layout = new GlifLayout(mContext);
120 layout.setProgressBarShown(true);
121 layout.setPrimaryColor(ColorStateList.valueOf(Color.RED));
123 ColorStateList.valueOf(Color.RED), layout.getPrimaryColor());
126 ProgressBar progressBar = (ProgressBar) layout.findViewById(R.id.suw_layout_progress);
133 assertEquals(Color.RED, ((GlifPatternDrawable) getTabletBackground(layout)).getColor());
138 GlifLayout layout = new GlifLayout(mContext);
139 layout.setPrimaryColor(ColorStateList.valueOf(Color.BLUE));
140 layout.setBackgroundBaseColor(ColorStateList.valueOf(Color.RED));
142 assertEquals(Color.RED, ((GlifPatternDrawable) getPhoneBackground(layout)).getColor());
143 assertEquals(Color.RED, layout.getBackgroundBaseColor().getDefaultColor());
149 GlifLayout layout = new GlifLayout(mContext);
150 layout.setPrimaryColor(ColorStateList.valueOf(Color.BLUE));
151 layout.setBackgroundBaseColor(ColorStateList.valueOf(Color.RED));
153 assertEquals(Color.RED, ((GlifPatternDrawable) getTabletBackground(layout)).getColor());
154 assertEquals(Color.RED, layout.getBackgroundBaseColor().getDefaultColor());
159 GlifLayout layout = new GlifLayout(mContext);
160 layout.setBackgroundPatterned(true);
162 assertThat(getPhoneBackground(layout), instanceOf(GlifPatternDrawable.class));
163 assertTrue("Background should be patterned", layout.isBackgroundPatterned());
168 GlifLayout layout = new GlifLayout(mContext);
169 layout.setBackgroundPatterned(false);
171 assertThat(getPhoneBackground(layout), instanceOf(ColorDrawable.class));
172 assertFalse("Background should not be patterned", layout.isBackgroundPatterned());
178 GlifLayout layout = new GlifLayout(mContext);
179 layout.setBackgroundPatterned(true);
181 assertThat(getTabletBackground(layout), instanceOf(GlifPatternDrawable.class));
182 assertTrue("Background should be patterned", layout.isBackgroundPatterned());
188 GlifLayout layout = new GlifLayout(mContext);
189 layout.setBackgroundPatterned(false);
191 assertThat(getTabletBackground(layout), instanceOf(ColorDrawable.class));
192 assertFalse("Background should not be patterned", layout.isBackgroundPatterned());
204 GlifLayout layout = new GlifLayout(mContext);
205 assertNull("PeekProgressBar should return null initially", layout.peekProgressBar());
210 GlifLayout layout = new GlifLayout(mContext);
211 layout.setProgressBarShown(true);
213 layout.peekProgressBar());
218 GlifLayout layout = new GlifLayout(mContext);
219 final HeaderMixin header = layout.getMixin(HeaderMixin.class);
223 assertNotNull("GlifLayout should have icon mixin", layout.getMixin(IconMixin.class));
225 layout.getMixin(ProgressBarMixin.class));
230 GlifLayout layout = new GlifLayout(mContext);
232 final View view = layout.inflateFooter(android.R.layout.simple_list_item_1);
234 assertNotNull(layout.findViewById(android.R.id.text1));
245 GlifLayout layout = new GlifLayout(mContext, R.layout.suw_glif_blank_template);
247 final View view = layout.inflateFooter(android.R.layout.simple_list_item_1);
249 assertNotNull(layout.findViewById(android.R.id.text1));
260 GlifLayout layout = new GlifLayout(
263 .addAttribute(R.attr.suwFooter, "@android:layout/simple_list_item_1")
266 assertNotNull(layout.findViewById(android.R.id.text1));
269 private Drawable getPhoneBackground(GlifLayout layout) {
271 (StatusBarBackgroundLayout) layout.findManagedViewById(R.id.suw_pattern_bg);
275 private Drawable getTabletBackground(GlifLayout layout) {
276 final View patternBg = layout.findManagedViewById(R.id.suw_pattern_bg);
280 private void assertDefaultTemplateInflated(GlifLayout layout) {
281 View title = layout.findViewById(R.id.suw_layout_title);
284 View icon = layout.findViewById(R.id.suw_layout_icon);
287 View scrollView = layout.findViewById(R.id.suw_scroll_view);