我试图让我的文本包装在左边的顶部行下,但它不会让我。我甚至用过wrap_content
。文本视图文本没有正确包装
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:screenOrientation="portrait"
android:gravity="center_horizontal">
<TextView
android:text="@string/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@android:style/TextAppearance.Large"
android:textColor="@color/wc"
android:layout_gravity="center_horizontal" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:text="@string/yellow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
style="@android:style/TextAppearance.Medium"
android:textColor="@color/yellow" />
<TextView
android:text="@string/teal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
style="@android:style/TextAppearance.Medium"
android:textColor="@color/teal" />
<TextView
android:text="@string/red"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
style="@android:style/TextAppearance.Medium"
android:textColor="@color/red" />
<TextView
android:text="@string/and"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
style="@android:style/TextAppearance.Medium"
android:textColor="@color/white" />
<TextView
android:text="@string/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
style="@android:style/TextAppearance.Medium"
android:textColor="@color/white" />
<TextView
android:text="@string/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
style="@android:style/TextAppearance.Medium"
android:textColor="@color/white" />
</LinearLayout>
</LinearLayout>
你想包装哪个文本是“Terminus”还是下面的大textview? – Bernas 2014-09-21 20:16:32
在 – MacaronLover 2014-09-21 20:39:21