网站运营规划,深圳市福田区住房和建设局,登记注册身份验证app下载,建筑作品集网站代做要在窗口获得焦点以后再去获取控件在屏幕上的绝对坐标#xff0c;在onCreate或者onResume函数里使用#xff0c;均得不到实际坐标。 解决方法 TextViewandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:onClick…要在窗口获得焦点以后再去获取控件在屏幕上的绝对坐标在onCreate或者onResume函数里使用均得不到实际坐标。 解决方法 TextViewandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:onClickleftTopandroid:idid/textView/
使用配置属性方法点击回调 public void leftTop(View view) {
int[] location new int[2];
view.getLocationOnScreen(location); }