0
getLeft() 메서드로 코드에서 ImageView의 위치를 인쇄하려고했는데 올바른 값 (80)을 반환했는지 확인하기 만하면 logcat은 192를 반환했습니다.getLeft()가 잘못된 값을 반환했습니다.
ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/image1"
android:layout_gravity="center_horizontal"
android:src="@drawable/image1"
android:layout_marginLeft="80dp"/>
인쇄 명령 :
public void onWindowFocusChanged (boolean hasFocus){
super.onWindowFocusChanged(hasFocus);
if(hasFocus){
a = (ImageView)findViewById(R.id.image1);
Log.v(LOGS, "image a = " + a.getLeft());
}
}