What is the difference between setX and setTranslationX on a view? They seem to be the same for me yet they exist both on the android platform.
Thanks
From the docs for setX():
Sets the visual x position of this view, in pixels. This is equivalent to setting the translationX property to be the difference between the x value passed in and the current left property.
setTranlsationX() as a relative offset and setX() is a fixed position.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With