いつか私はこれらのAndroidレイアウトのコードを解読するでしょう。はぁ
画面の上部に固定されたTextView、その下にスクロール可能なリストビュー、画面の下部に固定されたeditTextとボタン(ユーザーがアイテムを追加できるようにするためのアイデア)を使用したアクティビティが必要です。リスト)。
質問として以下の作業コードが回答されました:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="match_parent"
>
<TextView
android:id="@+id/tvAddQuizWordQuizName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:text="Quiz Name"
android:textSize="26dip"
/>
<ListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/list"
android:layout_below="@+id/tvAddQuizWordQuizName"
android:layout_above="@+id/bottomArea"
/>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:id="@+id/bottomArea"
>
<EditText
android:id="@+id/etAddQuizWord"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/btnAddQuizWord"
android:textColor="@android:color/black"
android:inputType="textNoSuggestions"
android:hint="Enter quiz word..."
android:textSize="32dip"
android:layout_alignParentLeft="true"
android:background="#0000ff"
>
</EditText>
<Button
android:text="Add"
android:id="@+id/btnAddQuizWord"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dip"
android:textStyle="bold"
android:gravity="center"
android:layout_alignParentRight="true"
android:onClick="AddButtonClicked"
/>
</RelativeLayout>
</RelativeLayout>
問題は、lopのtextviewとlistViewが表示されていないことです。とてもシンプルなことだと思いますが、うまくいきません。