Other questions about setting view position. If you want to move the view around, you can do setX , setTranslationX , setLeft or LayoutParam.leftMargin Offcourse also cancels the onDraw method and uses the Matrix / Raster / Canvas operation.
I was wondering what the difference is. Do they all fully customize the same value, which is the x coordinate for the view? It would be nice to have all this in one post for future readers.
Still know
- LayoutParam.LeftMargin: available for all APIs (especially for Api 8)
- SetTranslation: The difference between the original left border of the view and the new left. Although I heard, perhaps this is not persistent?
Can anyone shed light on the differences and do they affect different properties or the same properties?
android
Snake
source share