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

 

相关文章:

  • 2021-10-17
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
  • 2021-05-04
猜你喜欢
  • 2021-04-27
  • 2022-12-23
  • 2021-07-06
  • 2021-07-04
  • 2021-11-16
  • 2021-09-21
相关资源
相似解决方案