와 SQLite는이 -ANDROID :의 ListView
<?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>
내 문제는 내 첫 레이아웃에서 데이터를 추적 할 때 두 번째 레이아웃을 채우는 방법을 모르겠다는 것입니다. 두 번째 레이아웃은 사용자가리스트 뷰를 채우기 위해 입력 한 내용을 어떻게 알 수 있습니까?
저는 현재 dbadapter 클래스 (도우미 클래스가있는), 엔트리 클래스 (엔트리 객체 생성) 및 assignmentclass 목록보기)
어떤 아이디어입니까?
문제를 이해할 수 없습니다. 추가 버튼을 클릭하고 주 레이아웃으로 두 번째 XML을 사용하여 새 활동을 시작하고 목록을 채 웁니다. – Barak
실제 질문은 무엇인지 알기가 어렵습니다. '두 번째 페이지에 나열되는 항목을 만드는 방법'은 무엇을 의미합니까? 또한 너무 많은 관련성이없는 코드 –
예, 설명하기가 어렵습니다. 기본적으로 나는 다른 페이지에서 데이터베이스 결과를 게시하는 방법을 모르겠습니다. –