Lots of code cleanup

Confirm dialog cancel now also works on touch outside and click back button
New task dialog is now also an Edit Task dialog:
 - data is loaded when clicked on an existing  Task
 - a delete button is added on Edit mode
 - Undo in snackbar is working
 - Saving inserts or updates in DB depending on mode
This commit is contained in:
2015-12-16 23:48:58 -05:00
parent 8386a136b5
commit 239e34d9fd
22 changed files with 161 additions and 266 deletions

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
tools:context="com.wismna.geoffroy.donext.activities.TaskDetailsActivity">
<fragment
android:name="com.wismna.geoffroy.donext.fragments.TaskDetailsFragment"
android:id="@+id/task_details_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>

View File

@@ -30,7 +30,7 @@
android:layout_height="wrap_content"
android:maxLines="2"
android:textColor="@color/colorPrimary"
android:textSize="14dp"
android:textSize="14sp"
android:textAppearance="?attr/textAppearanceListItemSmall" />
</LinearLayout>
</LinearLayout>

View File

@@ -1,18 +0,0 @@
<RelativeLayout 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"
tools:context="com.wismna.geoffroy.donext.fragments.TaskDetailsFragment">
<EditText
android:id="@+id/task_details_name"
android:layout_width="300dp"
android:layout_height="50dp"
android:text="@string/hello_blank_fragment" />
<EditText
android:id="@+id/task_details_description"
android:layout_width="300dp"
android:layout_height="50dp"
android:layout_below="@id/task_details_name"
android:text="@string/hello_blank_fragment" />
</RelativeLayout>