TranslateAnimations를 처리 할 때 특정 오브젝트를 위치 A에서 위치 B로 이동할 수 있습니다.이 위치에 대한 좌표는 Relative_To_Self 대 Relative_To_Parent로 나타낼 수 있습니다. 이 위치는 백분율로 표시됩니다.Android - Relative_to_Parent 대 Relative_To_Self
정확히 무엇을 의미합니까?
예를 들어 너비가 Fill_Parent로 설정된 Relative_Layout과 그 너비가 80pixels 인 ImageView가 있다고 가정합니다. 여기
내가보고하고있는 정의이다 : 나는 Relative_to_parent 내 fromXType을 설정하고 0.0로 내 X의 값 경우public TranslateAnimation (int fromXType, float fromXValue, int toXType, float toXValue, int fromYType, float fromYValue, int toYType, float toYValue)
. 이것은 내 imageView가 화면의 가장 왼쪽에서 시작한다는 것을 의미합니까?
부모와 상대 값 X 값을 -1.0으로 설정하면 원래 위치에서 -80 픽셀부터 시작됩니다.
내 가정이 맞습니까? 모든 도움을 미리 감사드립니다.
이 대한 올바른 대답은 이미 있습니까? – Swapnil