mirror of
https://github.com/wismna/DoNext.git
synced 2025-10-04 08:00:14 -04:00
Lots of code cleanup and improvements after inspection
Load Today tasks in a AsyncTask Use of plurals instead of string Menu icons change No more tasks now displayed in the center of the screen
This commit is contained in:
@@ -58,6 +58,6 @@
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:onClick="onNewTaskClick"
|
||||
android:src="@drawable/ic_add_white_24dp" />
|
||||
android:src="@drawable/ic_add" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
@@ -30,6 +30,6 @@
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:onClick="onNewTaskClick"
|
||||
android:src="@drawable/ic_add_white_24dp" />
|
||||
android:src="@drawable/ic_add" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
@@ -7,7 +7,6 @@
|
||||
android:id="@+id/task_confirmation_never"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/text_margin"
|
||||
android:layout_marginStart="@dimen/text_margin"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/task_confirmation_never_button" />
|
||||
|
@@ -1,112 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
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:fitsSystemWindows="true">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
<include layout="@layout/toolbar" android:id="@+id/dialog_toolbar" />
|
||||
</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:padding="@dimen/text_margin"
|
||||
android:orientation="vertical"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
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: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"
|
||||
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_today_label"
|
||||
android:text="@string/new_task_today"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_below="@id/new_task_priority" />
|
||||
<CheckBox
|
||||
android:id="@+id/new_task_today"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@id/new_task_today_label"
|
||||
android:layout_below="@id/new_task_priority" />
|
||||
<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_today" />
|
||||
<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>
|
@@ -9,7 +9,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical|start"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_reorder_grey_500_24dp"
|
||||
android:src="@drawable/ic_reorder"
|
||||
android:contentDescription="@string/task_list_drag_handle"/>
|
||||
<TextView
|
||||
android:id="@+id/task_list_count"
|
||||
@@ -23,6 +23,7 @@
|
||||
android:layout_height="?listPreferredItemHeight"
|
||||
android:layout_weight="2"
|
||||
android:inputType="text"
|
||||
android:hint="@string/task_list_edit_list_hint"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"/>
|
||||
<Button
|
||||
android:id="@+id/task_list_delete"
|
||||
|
@@ -16,7 +16,6 @@
|
||||
android:id="@+id/new_task_list_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="75dp"
|
||||
android:layout_marginStart="75dp">
|
||||
<EditText
|
||||
android:id="@+id/new_task_list_name"
|
||||
|
@@ -15,6 +15,14 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top|center"/>
|
||||
<TextView
|
||||
android:id="@+id/no_more_tasks"
|
||||
android:text="@string/task_no_tasks"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center|center"
|
||||
android:visibility="gone"/>
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/task_list_view"
|
||||
android:layout_width="match_parent"
|
||||
@@ -31,7 +39,6 @@
|
||||
android:id="@+id/task_list_background"
|
||||
android:layout_marginLeft="@dimen/text_margin"
|
||||
android:layout_marginRight="@dimen/text_margin"
|
||||
android:layout_below="@id/total_task_cycles"
|
||||
android:layout_height="70dp"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/colorAccent"
|
||||
|
Reference in New Issue
Block a user