Android View confused with X, left, and transitionX

37 views
Skip to first unread message

Pu Yongming

unread,
Sep 28, 2015, 9:54:36 AM9/28/15
to android-platform
Hi all,


I am very confused and can't understand the necessary of the x, left property in class View.
I searched the internet and found:  x = getLeft() + getTransitionX();


why need some thing like that.
I think a single x or left is enough for a view system to layout, measure and draw.

can someone explian for me?


BR,
Hunter

Tyler Futrell

unread,
Sep 28, 2015, 11:45:24 AM9/28/15
to android-platform
The "x = getLeft" is for telling system that "X is left" and the " getTransitionX()" is to say that it is able to move, and that its not locked in place.

Pu Yongming

unread,
Sep 29, 2015, 10:08:10 AM9/29/15
to android-platform
thanks, but why can't there be a single X, no left, no translation. if you move a view, just change the x. this is much simpler.

Tyler Futrell

unread,
Nov 16, 2015, 6:01:35 PM11/16/15
to android-...@googlegroups.com
Alright, so i explained the first part, it is trying to say: "I want the X to be the same as left, now I want it to change or in other words Transistion". I know that it would be simpler, but that is the way it is. 
Reply all
Reply to author
Forward
0 new messages