int[] location = new  int[2] ;
    view.getLocationInWindow(location); //获取在当前窗口内的绝对坐标
    view.getLocationOnScreen(location);//获取在整个屏幕内的绝对坐标
    System.out.println("view--->x坐标:"+location [0]+"view--->y坐标:"+location [1]);

 

posted on 2012-09-06 16:58  alex_wongh  阅读(15092)  评论(0编辑  收藏  举报