gpt4 book ai didi

android - setX 和 setTranslationX 有什么区别

转载 作者:太空宇宙 更新时间:2023-11-03 12:06:23 29 4
gpt4 key购买 nike

View 上的 setX 和 setTranslationX 有什么区别?它们对我来说似乎是一样的,但它们都存在于 android 平台上。

谢谢

最佳答案

来自 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.

关于android - setX 和 setTranslationX 有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28902910/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com