文/布局对齐方式的Andr​​oid(textAlignment,重力)重力、布局、方式、Andr

2023-09-06 01:48:59 作者:折耳兔叽耶

什么是机器人之间的区别:textAlignment 安卓?重力

推荐答案

我所能看到的是,textAlignment View类的成员,并在重力的TextView类的成员。所以对于TextView的和它的子类,你可以使用重力,而你可以使用textAlignment所有视图。

All I can see is that the textAlignment is a member of the View Class and the gravity is the member of TextView class. So for the TextView and it's subclasses you can use the gravity while you can use the textAlignment for all Views.

由于TextView的和它的子类需要一些更多的文本对齐功能,所以你可以看到有重力更多的选择,凡在textAlignment只有基本选项。虽然这仅仅是我的猜测,因为我还没有发现对差异的任何清晰的文档。

As the TextView and its subclasses needs some more text aligning features so you can see there are more options in gravity where in textAlignment there are only basic options. ALthough it is only my guess because I have not found any clear documentation about the difference.

您可以看到文件的这两个环节

You can see these two links of documentation

textAlignment和gravity