php 网站共享变量,网页制作培训教学,英孚做网络作业的网站,推广网站平台免费要在窗口获得焦点以后再去获取控件在屏幕上的绝对坐标#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); }