文/布局对齐方式的Andr​​oid(textAlignment,重力) [英] Text/Layout Alignment in Android (textAlignment, gravity)

查看:2342
本文介绍了文/布局对齐方式的Andr​​oid(textAlignment,重力)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是机器人之间的区别: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

<一个href="http://developer.android.com/reference/android/view/View.html#attr_android%3atextAlignment">textAlignment和<一href="http://developer.android.com/reference/android/widget/TextView.html#attr_android%3agravity">gravity

这篇关于文/布局对齐方式的Andr​​oid(textAlignment,重力)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆