<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/speed"
android:inputType="number"></EditText>"
<TextView
android:id="@+id/TextViewSpeed"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text ="Speed"
android:layout_below="@+id/speed"
/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:text="AddValue"
android:id="@+id/AddValue"
>
</Button>
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/ListView"
android:layout_below="@+id/AddValue"
>
</ListView>
</RelativeLayout>
これは私のレイアウトコードです。EditText から同じページにある ListView にテキスト データを追加したかったのです。AddValue ボタンをクリックしたときにリストにテキストを追加するコードの書き方。前もって感謝します。