私はここで問題を抱えています.Androidのレイアウトに慣れていないため、このレイアウトを思い通りに実行できません。
次のように表示したいと思います。
[Button][Button]
Text Filled Here
Text Filled Here
Text Filled Here
Text Filled Here
Text Filled Here
TextView は、テキストを UI に送信する messagehelper を介して設定されます
最終的に、私のコードは、Web サービスから取得したオブジェクトのリストを繰り返し処理し、それらをすべて独自の行に表示し、いずれかを押してマップ上に表示するオプションを付けます。
現時点では、2 つのボタンまたはテキストを個別に表示するか、3 つすべてを同じ行に表示することしかできません。最初の行の 2 つのボタンと下に入力されたテキストではありません!!
これが私のコードです:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/buttonLayout"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="1">
<Button
android:id="@+id/vehicleButton"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="1"
android:text="Refresh"
android:onClick="getVehicles" />
<Button
android:id="@+id/logoutButton"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="1"
android:text="Logout"
android:onClick="logout" />
</LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textLayout"
android:layout_height="wrap_content"
android:layout_width="fill_parent">
<TextView
android:id="@+id/textView1"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
</LinearLayout>