-これは、これまでの入力のレイアウトです-
<?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="wrap_content"
android:orientation="vertical" >
<EditText
android:id="@+id/etClassName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:hint="@string/className"/>
<EditText
android:id="@+id/etAssignmentName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:ems="10"
android:hint="@string/assignmentName"/>
<EditText
android:id="@+id/etDueDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:layout_marginBottom="20dp"
android:hint="@string/dueDate" />
<EditText
android:id="@+id/etNotes"
android:layout_width="match_parent"
android:layout_height="194dp"
android:ems="10"
android:inputType="textMultiLine"
android:layout_marginBottom="5dp"
android:hint="@string/notes"/>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="horizontal">
<Button
android:id="@+id/bAddAssignments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/addAssignment"
android:layout_weight="1" />
<Button
android:id="@+id/bViewAssignments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/viewAssignments"
android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>
-[追加]ボタンをクリックすると、このページが表示されます。このページには、クリックして割り当てを表示できる割り当て名が一覧表示されます-
<?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" >
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.63" >
</ListView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/bNewAssignment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/newAssignment" />
<Button
android:id="@+id/bdeleteAssignment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/deleteAssignment" />
</LinearLayout>
</LinearLayout>
私の問題は、最初のレイアウトがデータを追跡しているときに、2番目のレイアウトにデータを入力する方法がわからないことです。2番目のレイアウトは、リストビューに入力するためにユーザーが入力した内容などをどのように認識しますか
現在、dbadapterクラス(ヘルパークラスを内部に含む)、entryクラス(エントリオブジェクトを作成する)、およびassignmentclass(リストビューを表示することを想定)があります。
何かアイデアはありますか?