static public void assertBottomAligned(View first,View second,int margin){
  int[] xy=new int[2];
  first.getLocationOnScreen(xy);
  int firstBottom=xy[1] + first.getMeasuredHeight();
  second.getLocationOnScreen(xy);
  int secondBottom=xy[1] + second.getMeasuredHeight();
  assertEquals("views are not bottom aligned",Math.abs(firstBottom - secondBottom),margin);
}

static public void assertBottomAligned ( View first , View second , int margin ) { int [ ] xy = new int [ 2 ] ; first . getLocationOnScreen ( xy ) ; int firstBottom = xy [ 1 ] + first . getMeasuredHeight ( ) ; second . getLocationOnScreen ( xy ) ; int secondBottom = xy [ 1 ] + second . getMeasuredHeight ( ) ; assertEquals ( "views are not bottom aligned" , Math . abs ( firstBottom - secondBottom ) , margin ) ; }
assert that two views are bottom aligned , that is that their bottom edges are on the same y location , with respect to the specified margin .
