Lines Matching refs:View
21 import android.view.View;
22 import android.view.ViewGroup;
29 * View Matchers</a> instead. New test should be written using the
40 * Assert that view is on the screen.
41 * @param origin The root view of the screen.
42 * @param view The view.
44 static public void assertOnScreen(View origin, View view) {
46 view.getLocationOnScreen(xy);
53 assertTrue("view should have positive y coordinate on screen",
56 assertTrue("view should have y location on screen less than drawing "
57 + "height of root view",
58 y <= view.getRootView().getHeight());
62 * Assert that view is below the visible screen.
63 * @param origin The root view of the screen.
64 * @param view The view
66 static public void assertOffScreenBelow(View origin, View view) {
68 view.getLocationOnScreen(xy);
75 assertTrue("view should have y location on screen greater than drawing "
76 + "height of origen view (" + y + " is not greater than "
82 * Assert that view is above the visible screen.
83 * @param origin Te root view of the screen.
84 * @param view The view
86 static public void assertOffScreenAbove(View origin, View view) {
88 view.getLocationOnScreen(xy);
95 assertTrue("view should have y location less than that of origin view",
100 * Assert that a view has a particular x and y position on the visible screen.
101 * @param origin The root view of the screen.
102 * @param view The view.
106 static public void assertHasScreenCoordinates(View origin, View view, int x, int y) {
108 view.getLocationOnScreen(xy);
121 * @param first The first view
122 * @param second The second view
124 static public void assertBaselineAligned(View first, View second) {
139 * @param first The first view
140 * @param second The second view
142 static public void assertRightAligned(View first, View second) {
157 * @param first The first view
158 * @param second The second view
159 * @param margin The margin between the first view and the second view
161 static public void assertRightAligned(View first, View second, int margin) {
176 * @param first The first view
177 * @param second The second view
179 static public void assertLeftAligned(View first, View second) {
194 * @param first The first view
195 * @param second The second view
196 * @param margin The margin between the first view and the second view
198 static public void assertLeftAligned(View first, View second, int margin) {
213 * @param first The first view
214 * @param second The second view
216 static public void assertBottomAligned(View first, View second) {
231 * @param first The first view
232 * @param second The second view
233 * @param margin The margin between the first view and the second view
235 static public void assertBottomAligned(View first, View second, int margin) {
250 * @param first The first view
251 * @param second The second view
253 static public void assertTopAligned(View first, View second) {
268 * @param first The first view
269 * @param second The second view
270 * @param margin The margin between the first view and the second view
272 static public void assertTopAligned(View first, View second, int margin) {
284 * Assert that the <code>test</code> view is horizontally center aligned
285 * with respect to the <code>reference</code> view.
287 * @param reference The reference view
288 * @param test The view that should be center aligned with the reference view
290 static public void assertHorizontalCenterAligned(View reference, View test) {
305 * Assert that the <code>test</code> view is vertically center aligned
306 * with respect to the <code>reference</code> view.
308 * @param reference The reference view
309 * @param test The view that should be center aligned with the reference view
311 static public void assertVerticalCenterAligned(View reference, View test) {
347 static public void assertGroupContains(ViewGroup parent, View child) {
371 static public void assertGroupNotContains(ViewGroup parent, View child) {