Greatly improved code with interfaces

Task and cycle count are now updating
List edition rendering is better
List names can be edited inline
This commit is contained in:
2015-12-31 17:35:14 -05:00
parent c8dbcb1aff
commit 83f37cd98a
13 changed files with 429 additions and 452 deletions

View File

@@ -2,8 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="70dp"
android:orientation="horizontal"
android:foreground="?selectableItemBackground" >
android:orientation="horizontal" >
<TextView
android:id="@+id/task_cycle"
android:layout_width="56dp"

View File

@@ -1,34 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:foreground="?selectableItemBackground" >
android:orientation="horizontal" >
<TextView
android:id="@+id/task_list_count"
android:layout_width="wrap_content"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:padding="10dp"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<EditText
android:id="@+id/task_list_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_toRightOf="@id/task_list_count"
android:layout_toEndOf="@id/task_list_count"
android:layout_width="200dp"
android:layout_height="?listPreferredItemHeight"
android:inputType="text"
android:textAppearance="?android:attr/textAppearanceLarge"/>
<Button
android:id="@+id/task_list_delete"
android:layout_width="wrap_content"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:padding="10dp"
android:text="@string/task_list_delete"
android:onClick="onDeleteTaskList" />
</RelativeLayout>
android:text="@string/task_list_delete" />
</LinearLayout>

View File

@@ -9,23 +9,23 @@
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
tools:context=".activities.TaskListActivity">
<RelativeLayout
<LinearLayout
android:id="@+id/new_task_list_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginStart="50dp">
<EditText
android:id="@+id/new_task_list_name"
android:layout_width="wrap_content"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:hint="@string/task_list_new_list_hint"/>
<Button
android:id="@+id/new_task_list_button"
android:layout_width="wrap_content"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:text="@string/task_list_new_list_create"/>
</RelativeLayout>
</LinearLayout>
<android.support.v7.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
@@ -34,8 +34,6 @@
android:name="com.wismna.geoffroy.donext.fragments.TaskListFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
app:layoutManager="LinearLayoutManager"
tools:context=".fragments.TaskListsFragment"
tools:listitem="@layout/fragment_tasklist" />