3
我試圖將RelativeLayout中的一個項目放置到另一個項目的右側。在下面的示例中,我希望將「,」放置在說明字段的右側。然而,問題在於它將逗號放在名稱字段旁邊的第一行。誰能幫忙?佈局文件 - 將項目定位到另一個項目的右側(Android)
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:padding="10sp">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/name" />
<TextView
android:id="@+id/descriptioncomma"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=", "
android:layout_toRightOf="@id/description" />
謝謝你 - 它完美的作品。 – GuybrushThreepwood