【发布时间】:2015-08-23 21:53:14
【问题描述】:
大家好,我正在开发 android 应用程序,我正在使用 TextView 显示一些文本,并在屏幕上居中对齐。但问题是文本在屏幕上没有正确对齐。这是我用来在屏幕上显示居中对齐的文本的 xml 代码。请帮我做这件事。
<TextView
android:id="@+id/lastMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:layout_gravity="center"
android:text="Mana addd asdwd ekff fec greq crrq grooe cieurnf covhrpw cjcneie ejducbc ueiche deidhe idhcecm ekwp ww"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="12sp" />
【问题讨论】: