what's the difference between View.getLeft () vs View.getScrollX ()? Please do not copy or paste the definition from the documentation, because I am going to do it for you below
getScrollX ()
Return the scrolled left position of this view.
getLeft ()
Left position of this view relative to its parent
I think these 2 values should be the same, but an example of my program, if I do View.scrollBy (20, 0), I see that getScrollX () will return 20, and the view will actually be moved to the right, but getLeft () will remain equal zero
I am confused because if visually the view scrolls right 20 pixels, its left position should also be updated, but it is still 0
obviously they cannot be the same, otherwise there is no need to have two different methods that return the same result
please, help
source share