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:
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M22,5.72l-4.6,-3.86 -1.29,1.53 4.6,3.86L22,5.72zM7.88,3.39L6.6,1.86 2,5.71l1.29,1.53 4.59,-3.85zM12.5,8L11,8v6l4.75,2.85 0.75,-1.23 -4,-2.37L12.5,8zM12,4c-4.97,0 -9,4.03 -9,9s4.02,9 9,9c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,20c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z"/>
|
||||
</vector>
|
@@ -35,7 +35,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="80dp"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:orientation="horizontal">
|
||||
<android.widget.ListView
|
||||
android:id="@+id/tabs"
|
||||
|
@@ -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"
|
||||
|
14
DoNExt/app/src/main/res/menu/menu_new_task.xml
Normal file
14
DoNExt/app/src/main/res/menu/menu_new_task.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/menu_new_task_save"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/new_task_save"
|
||||
app:showAsAction="always"/>
|
||||
<item
|
||||
android:id="@+id/menu_new_task_delete"
|
||||
android:orderInCategory="50"
|
||||
android:title="@string/new_task_delete"
|
||||
app:showAsAction="ifRoom"/>
|
||||
</menu>
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">DoNext</string>
|
||||
<string name="about_version_android">Version d\'Android: %s</string>
|
||||
<string name="about_version_android">Version d\'Android: %d</string>
|
||||
<string name="about_version_donext">Version de DoNext: %s</string>
|
||||
<string name="action_about">À propos</string>
|
||||
<string name="action_changeLayout">Changer l\'apparence</string>
|
||||
@@ -66,4 +66,5 @@
|
||||
<string name="task_list_today_list_error">Le nom \"Aujourd\'hui\" est réservé. Vous pouvez activer la liste Aujourd\'hui dans les paramètres.</string>
|
||||
<string name="settings_today_action_title">Action à entreprendre à la fin de la journée:</string>
|
||||
<string name="new_task_due_date">Date de fin</string>
|
||||
<string name="task_alarm">Task is past due date</string>
|
||||
</resources>
|
4
DoNExt/app/src/main/res/values-large/bools.xml
Normal file
4
DoNExt/app/src/main/res/values-large/bools.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<bool name="large_layout">true</bool>
|
||||
</resources>
|
4
DoNExt/app/src/main/res/values/bools.xml
Normal file
4
DoNExt/app/src/main/res/values/bools.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<bool name="large_layout">false</bool>
|
||||
</resources>
|
@@ -75,7 +75,7 @@
|
||||
|
||||
<!-- Strings related to About -->
|
||||
<string name="about_version_donext">DoNext version %s</string>
|
||||
<string name="about_version_android">Android version %s</string>
|
||||
<string name="about_version_android">Android version %d</string>
|
||||
<string name="about_link" translatable="false">https://github.com/wismna</string>
|
||||
<string name="settings_today_title">Today list</string>
|
||||
<string name="settings_today_enable">Enable Today list?</string>
|
||||
@@ -84,4 +84,5 @@
|
||||
<string name="task_list_today_list_error">Name \"Today\" is reserved. You may activate the Today list from the Settings.</string>
|
||||
<string name="settings_today_action_title">Action at the end of the day</string>
|
||||
<string name="new_task_due_date">Due date</string>
|
||||
<string name="task_alarm">Task is past due date</string>
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user