Code example for View

Methods: getHeightgetLocationOnScreen

    static public void assertOnBottomEdgeOfScreen(View origin, View view) {
        int[] xy = new int[2];
        int[] xyRoot = new int[2];
        int bottom = xy[1] + view.getHeight();
        int bottomOfRoot = xyRoot[1] + origin.getHeight();
        assertTrue(bottom > bottomOfRoot);
        assertTrue(xy[1] < bottomOfRoot);
        assertTrue(bottom > bottomOfRoot);
     * Assert that view overlaps the bottom edge of the screen 
     * @param origin The root view of the screen. 
     * @param view The view 
Experience pair programming with AI  Get Codota for Java