Это даст вам наш желаемый результат, я добавил второй макет, который, надеюсь, поможет вам понять, как использовать макеты, я также включил туда, где вы можете вырезать ту часть, которая вам не нужна.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView29"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/textView26"
android:text="Number of guest(s) : "
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/textView27"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/textView29"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
//Below not needed
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/textView26"
android:text="Number of guest(s) : "
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/textView2"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/textView29"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
//Above not needed
</LinearLayout>
Я сделал это, но он все еще не работает. –
Не могли бы вы разместить свой текущий xml-файл? – Galax
извините ... моя ошибка ... это работает! спасибо ... :) –