Add database helper

Add Task list activity
Add Create new task list
Add Custom CursorAdapter for task list view
This commit is contained in:
2015-11-25 18:03:55 -05:00
parent b5cc2ff82c
commit 31b9c8d3a3
12 changed files with 446 additions and 8 deletions

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
tools:context="com.wismna.geoffroy.donext.TaskListActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/new_task_list_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/task_list_new_list_hint"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onCreateTaskList"
android:text="@string/task_list_new_list_create"/>
</LinearLayout>
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent">
</ListView>
</LinearLayout>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/task_list_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="test"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<TextView
android:id="@+id/task_list_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="Name"
android:textAppearance="?android:attr/textAppearanceLarge"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/task_list_delete"
android:onClick="onDeleteTaskList" />
</LinearLayout>