我正在使用以下代码。但是所有方法都返回零值。我知道要获得视图的坐标,我们应该绘制视图。这就是为什么我在 onResume 方法中使用代码但仍然无法正常工作的原因。任何想法?
@Override
public void onResume(){
super.onResume();
System.out.println("Onresume");
System.out.println("tab1 - left" + btn_Tab7 .getLeft());
System.out.println("tab1 - Top" + btn_Tab7.getTop());
System.out.println("tab1 - right" + btn_Tab7.getRight());
System.out.println("tab1 - bottom" + btn_Tab7.getBottom());
}