Swipe task left to mark as done

Swipe task right to mark as nexted (increase cycle count)
Handles confirmation dialog (with settings)
Re-add floating add task button
Disable scrolling horizontally (except on the first task) and vertically
This commit is contained in:
2015-12-09 21:03:05 -05:00
parent 982ed80a20
commit 322c706f3d
17 changed files with 589 additions and 60 deletions

View File

@@ -30,10 +30,18 @@
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
<com.wismna.geoffroy.donext.widgets.NonSwipeableViewPager
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="@dimen/fab_margin"
android:onClick="onNewTaskClick"
android:src="@android:drawable/ic_input_add" />
</android.support.design.widget.CoordinatorLayout>

View File

@@ -0,0 +1,16 @@
<?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

@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
android:layout_width="match_parent"
android:layout_height="?listPreferredItemHeight"
android:orientation="horizontal"
android:foreground="?selectableItemBackground" >
<TextView
android:id="@+id/task_id"
android:layout_width="wrap_content"

View File

@@ -0,0 +1,18 @@
<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>

View File

@@ -26,6 +26,16 @@
<string name="new_task_save">Save</string>
<string name="new_task_cancel">Cancel</string>
<!-- String related to task details activity -->
<string name="task_details_activity_title">Details</string>
<!-- String related to task list Recycler View -->
<string name="task_swipe_confirmation_title">Confirm</string>
<string name="task_swipe_confirmation_done">Mark task as Done?</string>
<string name="task_swipe_confirmation_next">Mark task as Nexted?</string>
<string name="task_swipe_confirmation_yes">Yes</string>
<string name="task_swipe_confirmation_no">No</string>
<string name="task_swipe_confirmation_never">Never ask again</string>
<!-- Strings related to Settings -->
<string name="settings_confirm_donext">Confirm on DoNext?</string>
@@ -42,4 +52,7 @@
<item>7</item>
</string-array>
<string name="title_activity_task_list">TaskListActivity</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>