【发布时间】:2011-12-26 18:38:54
【问题描述】:
我目前正在从服务器的 xml 文件中将文本加载到我的应用程序中。 然而,这些文本被分配给 TextView。 我的文本没有按照我的需要对齐。即我希望这些文本作为 microsoft word 理由。
<TextView android:id="@+id/nvContent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dip"
android:layout_marginTop="5dip"
android:layout_weight="1"
android:gravity="fill"
android:text="Inglot Cosmetics now in Kathmandu Inglot, which has been selling its products in over 240 stores all over the world is now here for you in Kathmandu. It has one of the most extensive colour ranges in cosmetics collections. Working with the best makeup artists, Inglot brings you the latest trends in colour, texture and form. Experiment with countless shades and combinations of face powder, blushers, eye shadows and lipsticks."
android:textColor="#ff000000"
android:textSize="14sp" />
文字有点长。 我的应用程序没有像在 textview 中那样显示文本对齐方式。 我希望这些文本是合理的。 这可能吗?我在 stackoverflow.com 中读到 Android 不支持文本对齐是有道理的。 任何替代方案。还是我的 xml 文件应该做些什么?
【问题讨论】:
标签: android user-interface textview alignment