mirror of
https://github.com/wismna/DoNext.git
synced 2025-10-04 08:00:14 -04:00
Due Dates fully functional
Today list fully functional New and edit task dialog now goes full screen on smaller screens, stays as a pop-up on bigger ones New Alarm icon on expired tasks Better tasks layout Simpler new and edit task form layout: less labels, replaced radiogroup with slider,...
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
android:id="@+id/left_arrow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:contentDescription="@string/tab_left_arrow"
|
||||
@@ -39,7 +38,6 @@
|
||||
android:id="@+id/right_arrow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:contentDescription="@string/tab_right_arrow"
|
||||
@@ -48,9 +46,7 @@
|
||||
android:id="@+id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@+id/left_arrow"
|
||||
android:layout_toEndOf="@+id/left_arrow"
|
||||
android:layout_toLeftOf="@+id/right_arrow"
|
||||
android:layout_toStartOf="@+id/right_arrow"
|
||||
app:tabMode="scrollable" />
|
||||
</RelativeLayout>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
android:background="?android:attr/selectableItemBackground" >
|
||||
<TextView
|
||||
android:id="@+id/task_cycle"
|
||||
android:layout_width="56dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:textAppearance="?attr/textAppearanceListItem" />
|
||||
@@ -17,6 +17,13 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
<ImageView
|
||||
android:id="@+id/task_alarm"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:contentDescription="@string/task_alarm"/>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="?listPreferredItemHeight"
|
||||
|
@@ -1,106 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/text_margin"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activities.MainActivity">
|
||||
<TextView
|
||||
android:id="@+id/new_task_list_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/new_task_list"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
<Spinner
|
||||
android:id="@+id/new_task_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_toEndOf="@id/new_task_list_label">
|
||||
</Spinner>
|
||||
<TextView
|
||||
android:id="@+id/new_task_name_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/new_task_name"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:layout_below="@id/new_task_list_label"/>
|
||||
<EditText
|
||||
android:id="@+id/new_task_name"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/new_task_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay"/>
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<ScrollView
|
||||
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:layout_marginTop="?attr/actionBarSize"
|
||||
android:background="@android:color/background_light">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/new_task_name_hint"
|
||||
android:maxLines="1"
|
||||
android:inputType="text"
|
||||
android:layout_below="@id/new_task_name_label"/>
|
||||
<TextView
|
||||
android:id="@+id/new_task_description_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/new_task_description"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:layout_below="@id/new_task_name" />
|
||||
<EditText
|
||||
android:id="@+id/new_task_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/new_task_description_hint"
|
||||
android:gravity="top|start"
|
||||
android:lines="3"
|
||||
android:layout_below="@id/new_task_description_label" />
|
||||
<TextView
|
||||
android:id="@+id/new_task_priority_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/new_task_priority"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:layout_below="@id/new_task_description" />
|
||||
<RadioGroup
|
||||
android:id="@+id/new_task_priority"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/new_task_priority_label" >
|
||||
<RadioButton
|
||||
android:id="@+id/new_task_priority_low"
|
||||
android:text="@string/new_task_priority_low"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
</RadioButton>
|
||||
<RadioButton
|
||||
android:id="@+id/new_task_priority_normal"
|
||||
android:text="@string/new_task_priority_normal"
|
||||
android:padding="@dimen/text_margin"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activities.MainActivity">
|
||||
<TextView
|
||||
android:id="@+id/new_task_list_label"
|
||||
android:text="@string/new_task_list"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
<Spinner
|
||||
android:id="@+id/new_task_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_toEndOf="@id/new_task_list_label">
|
||||
</Spinner>
|
||||
<EditText
|
||||
android:id="@+id/new_task_name"
|
||||
android:hint="@string/new_task_name_hint"
|
||||
android:maxLines="1"
|
||||
android:inputType="text"
|
||||
android:textSize="30sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true">
|
||||
</RadioButton>
|
||||
<RadioButton
|
||||
android:id="@+id/new_task_priority_high"
|
||||
android:text="@string/new_task_priority_high"
|
||||
android:layout_below="@id/new_task_list"/>
|
||||
<EditText
|
||||
android:id="@+id/new_task_description"
|
||||
android:hint="@string/new_task_description_hint"
|
||||
android:gravity="top|start"
|
||||
android:lines="3"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
</RadioButton>
|
||||
</RadioGroup>
|
||||
<TextView
|
||||
android:id="@+id/new_task_due_date_label"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/new_task_due_date"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:layout_toEndOf="@id/new_task_priority"
|
||||
android:layout_below="@id/new_task_description" />
|
||||
<DatePicker
|
||||
android:id="@+id/new_task_due_date"
|
||||
android:calendarViewShown="true"
|
||||
android:spinnersShown="false"
|
||||
android:layout_width="800dp"
|
||||
android:layout_height="800dp"
|
||||
android:layout_toEndOf="@id/new_task_priority"
|
||||
android:layout_below="@id/new_task_due_date_label" />
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/new_task_name" />
|
||||
<TextView
|
||||
android:id="@+id/new_task_priority_label"
|
||||
android:text="@string/new_task_priority"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_below="@id/new_task_description" />
|
||||
<SeekBar
|
||||
android:id="@+id/new_task_priority"
|
||||
android:max="2"
|
||||
android:progress="1"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_toEndOf="@id/new_task_priority_label"
|
||||
android:layout_below="@id/new_task_description" />
|
||||
<TextView
|
||||
android:id="@+id/new_task_due_date_label"
|
||||
android:text="@string/new_task_due_date"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_below="@id/new_task_priority" />
|
||||
<DatePicker
|
||||
android:id="@+id/new_task_due_date"
|
||||
android:datePickerMode="spinner"
|
||||
android:calendarViewShown="false"
|
||||
android:spinnersShown="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/new_task_due_date_label" />
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
</android.support.design.widget.CoordinatorLayout>
|
@@ -6,8 +6,9 @@
|
||||
android:background="?android:attr/selectableItemBackground" >
|
||||
<TextView
|
||||
android:id="@+id/task_cycle"
|
||||
android:layout_width="56dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:paddingTop="10dp"
|
||||
android:textAppearance="?attr/textAppearanceListItem" />
|
||||
<TextView
|
||||
@@ -15,8 +16,17 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
<ImageView
|
||||
android:id="@+id/task_alarm"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:contentDescription="@string/task_alarm"/>
|
||||
<TextView
|
||||
android:id="@+id/task_name"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?attr/textAppearanceListItem"
|
||||
|
@@ -9,7 +9,6 @@
|
||||
android:id="@+id/total_task_cycles"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"/>
|
||||
<TextView
|
||||
android:id="@+id/total_task_count"
|
||||
@@ -41,7 +40,6 @@
|
||||
android:id="@+id/task_background_done"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/task_confirmation_done_button"
|
||||
@@ -53,7 +51,6 @@
|
||||
android:id="@+id/task_background_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/task_confirmation_next_button"
|
||||
|
Reference in New Issue
Block a user