Big change in the Today function: not a list anymore but a view, shown in the Toolbar

Layout enhancements (Coordinator Layout and Floating Action Button) in Tasks Fragment
Code refactoring
This commit is contained in:
bg45
2017-03-20 17:01:50 -04:00
parent bfca61935b
commit 63843043f9
33 changed files with 275 additions and 149 deletions

7
DoNExt/.idea/dictionaries/bg45.xml generated Normal file
View File

@@ -0,0 +1,7 @@
<component name="ProjectDictionaryState">
<dictionary name="bg45">
<words>
<w>geoffroy</w>
</words>
</dictionary>
</component>

2
DoNExt/.idea/misc.xml generated
View File

@@ -37,7 +37,7 @@
<ConfirmationsSetting value="0" id="Add" /> <ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" /> <ConfirmationsSetting value="0" id="Remove" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">

View File

@@ -8,8 +8,8 @@ android {
applicationId "com.wismna.geoffroy.donext" applicationId "com.wismna.geoffroy.donext"
minSdkVersion 19 minSdkVersion 19
targetSdkVersion 25 targetSdkVersion 25
versionCode 14 versionCode 15
versionName "1.3.0" versionName "1.4.0"
} }
buildTypes { buildTypes {
release { release {
@@ -21,7 +21,6 @@ android {
dependencies { dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.3.0' compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support:design:25.3.0' compile 'com.android.support:design:25.3.0'
compile 'com.android.support:support-v4:25.3.0' compile 'com.android.support:support-v4:25.3.0'
@@ -29,4 +28,5 @@ dependencies {
compile 'com.android.support:recyclerview-v7:25.3.0' compile 'com.android.support:recyclerview-v7:25.3.0'
compile 'com.google.android.gms:play-services-ads:10.2.0' compile 'com.google.android.gms:play-services-ads:10.2.0'
compile 'net.danlew:android.joda:2.9.7' compile 'net.danlew:android.joda:2.9.7'
testCompile 'junit:junit:4.12'
} }

View File

@@ -1,26 +1,28 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.wismna.geoffroy.donext"> package="com.wismna.geoffroy.donext">
<supports-screens <supports-screens
android:largeScreens="true" android:largeScreens="true"
android:smallScreens="true"> android:smallScreens="true" />
</supports-screens>
<application <application
android:name=".DoNext" android:name=".DoNext"
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme" android:theme="@style/AppTheme">
android:allowBackup="true"
android:fullBackupContent="true">
<activity <activity
android:name=".activities.MainActivity" android:name=".activities.MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" android:theme="@style/AppTheme.NoActionBar"
android:theme="@style/AppTheme.NoActionBar"> android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
@@ -48,5 +50,15 @@
android:name="android.support.PARENT_ACTIVITY" android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" /> android:value=".activities.MainActivity" />
</activity> </activity>
<activity
android:name=".activities.TodayActivity"
android:label="@string/title_activity_today"
android:parentActivityName=".activities.MainActivity"
android:theme="@style/AppTheme.NoActionBar">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
</application> </application>
</manifest> </manifest>

View File

@@ -6,7 +6,6 @@ import android.graphics.Point;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.TabLayout; import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentManager;
@@ -69,9 +68,6 @@ public class MainActivity extends AppCompatActivity implements TasksFragment.Tas
SharedPreferences sharedPref = SharedPreferences sharedPref =
PreferenceManager.getDefaultSharedPreferences(MainActivity.this); PreferenceManager.getDefaultSharedPreferences(MainActivity.this);
// Handle Today list
handleTodayList(sharedPref);
// Access database to retrieve Tabs // Access database to retrieve Tabs
try (TaskListDataAccess taskListDataAccess = new TaskListDataAccess(this)) { try (TaskListDataAccess taskListDataAccess = new TaskListDataAccess(this)) {
taskLists = taskListDataAccess.getAllTaskLists(); taskLists = taskListDataAccess.getAllTaskLists();
@@ -121,9 +117,6 @@ public class MainActivity extends AppCompatActivity implements TasksFragment.Tas
} }
}); });
} }
// Hide or show new task floating button
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.show();
} }
} }
@@ -143,19 +136,24 @@ public class MainActivity extends AppCompatActivity implements TasksFragment.Tas
@Override @Override
public boolean onPrepareOptionsMenu(Menu menu) { public boolean onPrepareOptionsMenu(Menu menu) {
MenuItem item = menu.findItem(R.id.action_changeLayout); // Handles layout change button
if (item == null) return false; MenuItem displayLayoutItem = menu.findItem(R.id.action_changeLayout);
if (displayLayoutItem == null) return false;
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
String layoutType = sharedPref.getString("pref_conf_task_layout", "1"); String layoutType = sharedPref.getString("pref_conf_task_layout", "1");
switch (layoutType) { switch (layoutType) {
case "1" : case "1" :
item.setIcon(R.drawable.ic_list_white_24dp); displayLayoutItem.setIcon(R.drawable.ic_list_white_24dp);
break; break;
case "2" : case "2" :
item.setIcon(R.drawable.ic_view_list_white_24dp); displayLayoutItem.setIcon(R.drawable.ic_view_list_white_24dp);
break; break;
} }
// Handles today list
MenuItem todayListItem = menu.findItem(R.id.action_todayList);
todayListItem.setVisible(sharedPref.getBoolean("pref_conf_today_enable", false));
return super.onPrepareOptionsMenu(menu); return super.onPrepareOptionsMenu(menu);
} }
@@ -191,9 +189,11 @@ public class MainActivity extends AppCompatActivity implements TasksFragment.Tas
FragmentManager fragmentManager = getSupportFragmentManager(); FragmentManager fragmentManager = getSupportFragmentManager();
// Set current tab value to new task dialog // Set current tab value to new task dialog
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putInt("list", currentTabPosition); args.putInt("list", currentTabPosition);
args.putBoolean("layout", mIsLargeLayout); args.putBoolean("layout", mIsLargeLayout);
args.putBoolean("today", sharedPref.getBoolean("pref_conf_today_enable", false));
taskDialogFragment.setArguments(args); taskDialogFragment.setArguments(args);
String title = getString(R.string.action_new_task); String title = getString(R.string.action_new_task);
@@ -211,6 +211,12 @@ public class MainActivity extends AppCompatActivity implements TasksFragment.Tas
} }
} }
/** Called when the user clicks on the Today List button */
public void showTodayList(MenuItem item) {
Intent intent = new Intent(this, TodayActivity.class);
startActivity(intent);
}
/** Called when the user clicks on the Change Layout button */ /** Called when the user clicks on the Change Layout button */
public void changeLayout(MenuItem item) { public void changeLayout(MenuItem item) {
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
@@ -273,27 +279,6 @@ public class MainActivity extends AppCompatActivity implements TasksFragment.Tas
} }
} }
private void handleTodayList(SharedPreferences sharedPref) {
String todayListName = getString(R.string.task_list_today);
try (TaskListDataAccess taskListDataAccess = new TaskListDataAccess(this, TaskListDataAccess.MODE.WRITE)) {
TaskList todayList = taskListDataAccess.getTaskListByName(todayListName);
if (sharedPref.getBoolean("pref_conf_today_enable", false)) {
// Get or create the Today list
if (todayList == null) {
// TODO: set order correctly
todayList = taskListDataAccess.createTaskList(todayListName, 0);
}
if (!todayList.isVisible())
taskListDataAccess.updateVisibility(todayList.getId(), true);
} else {
// Hide the today list if it exists
if (todayList != null) {
taskListDataAccess.updateVisibility(todayList.getId(), false);
}
}
}
}
/** /**
* A {@link FragmentPagerAdapter} that returns a fragment corresponding to * A {@link FragmentPagerAdapter} that returns a fragment corresponding to
* one of the sections/tabs/pages. * one of the sections/tabs/pages.
@@ -309,8 +294,7 @@ public class MainActivity extends AppCompatActivity implements TasksFragment.Tas
// getItem is called to instantiate the fragment for the given page. // getItem is called to instantiate the fragment for the given page.
// Return a PlaceholderFragment (defined as a static inner class below). // Return a PlaceholderFragment (defined as a static inner class below).
TaskList taskList = taskLists.get(position); TaskList taskList = taskLists.get(position);
return TasksFragment.newInstance(taskList.getId(), return TasksFragment.newTaskListInstance(taskList.getId(), MainActivity.this);
taskList.getName().equals(getString(R.string.task_list_today)), MainActivity.this);
} }
@Override @Override

View File

@@ -0,0 +1,31 @@
package com.wismna.geoffroy.donext.activities;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import com.wismna.geoffroy.donext.R;
public class TodayActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_today);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
// Get a support ActionBar corresponding to this toolbar
ActionBar ab = getSupportActionBar();
if (ab != null) {
// Enable the Up button
ab.setDisplayHomeAsUpEnabled(true);
}
}
public void onNewTaskClick(View view) {
}
}

View File

@@ -17,7 +17,6 @@ import com.wismna.geoffroy.donext.helpers.TaskListTouchHelper;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Objects;
/** /**
* {@link RecyclerView.Adapter} that can display a {@link TaskList}. * {@link RecyclerView.Adapter} that can display a {@link TaskList}.
@@ -35,14 +34,11 @@ public class TaskListRecyclerViewAdapter extends RecyclerView.Adapter<TaskListRe
private final List<TaskList> mValues; private final List<TaskList> mValues;
private TaskListRecyclerViewAdapterListener mListener; private TaskListRecyclerViewAdapterListener mListener;
private String mReservedTaskListName;
public TaskListRecyclerViewAdapter(List<TaskList> items, public TaskListRecyclerViewAdapter(List<TaskList> items,
TaskListRecyclerViewAdapterListener listener, TaskListRecyclerViewAdapterListener listener) {
String reservedTaskListName) {
mValues = items; mValues = items;
mListener = listener; mListener = listener;
mReservedTaskListName = reservedTaskListName;
} }
@Override @Override
@@ -70,10 +66,8 @@ public class TaskListRecyclerViewAdapter extends RecyclerView.Adapter<TaskListRe
} }
}); });
Boolean isReservedName = Objects.equals(holder.mItem.getName(), mReservedTaskListName);
holder.mTaskNameView.setEnabled(!isReservedName);
// Handle inline name change // Handle inline name change
if (!isReservedName) holder.mTaskNameView.setOnFocusChangeListener(new View.OnFocusChangeListener() { holder.mTaskNameView.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override @Override
public void onFocusChange(View v, boolean hasFocus) { public void onFocusChange(View v, boolean hasFocus) {
EditText editText = (EditText) v; EditText editText = (EditText) v;
@@ -88,9 +82,8 @@ public class TaskListRecyclerViewAdapter extends RecyclerView.Adapter<TaskListRe
} }
}); });
holder.mTaskDeleteButton.setEnabled(!isReservedName);
// Handle click on delete button // Handle click on delete button
if (!isReservedName) holder.mTaskDeleteButton.setOnClickListener(new View.OnClickListener() { holder.mTaskDeleteButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
// Disable the OnFocusChanged listener as it is now pointless and harmful // Disable the OnFocusChanged listener as it is now pointless and harmful

View File

@@ -17,6 +17,7 @@ public class Task {
private long taskList; private long taskList;
private String taskListName; private String taskListName;
private LocalDate dueDate; private LocalDate dueDate;
private LocalDate todayDate;
public long getId() { public long getId() {
return id; return id;
@@ -103,6 +104,19 @@ public class Task {
return dueDate; return dueDate;
} }
public void setTodayDate(String todayDate) {
try {
this.todayDate = LocalDate.parse(todayDate);
}
catch (Exception e){
this.todayDate = null;
}
}
public boolean isToday() {
return todayDate!= null && todayDate.isEqual(LocalDate.now());
}
// Will be used by the ArrayAdapter in the ListView // Will be used by the ArrayAdapter in the ListView
@Override @Override
public String toString() { public String toString() {

View File

@@ -9,7 +9,7 @@ import android.database.sqlite.SQLiteOpenHelper;
* Database helper class that contains table and column names as well as handles database creation * Database helper class that contains table and column names as well as handles database creation
*/ */
class DatabaseHelper extends SQLiteOpenHelper { class DatabaseHelper extends SQLiteOpenHelper {
private static final int DATABASE_VERSION = 3; private static final int DATABASE_VERSION = 4;
private static final String DATABASE_NAME = "donext.db"; private static final String DATABASE_NAME = "donext.db";
static final String COLUMN_ID = "_id"; static final String COLUMN_ID = "_id";
static final String COLUMN_ORDER = "displayorder"; static final String COLUMN_ORDER = "displayorder";
@@ -35,6 +35,7 @@ class DatabaseHelper extends SQLiteOpenHelper {
static final String TASKS_COLUMN_DELETED= "deleted"; static final String TASKS_COLUMN_DELETED= "deleted";
static final String TASKS_COLUMN_LIST = "list"; static final String TASKS_COLUMN_LIST = "list";
static final String TASKS_COLUMN_DUEDATE = "duedate"; static final String TASKS_COLUMN_DUEDATE = "duedate";
static final String TASKS_COLUMN_TODAYDATE = "todaydate";
private static final String TASKS_TABLE_CREATE = private static final String TASKS_TABLE_CREATE =
"CREATE TABLE " + TASKS_TABLE_NAME + " (" + "CREATE TABLE " + TASKS_TABLE_NAME + " (" +
COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " +
@@ -49,8 +50,14 @@ class DatabaseHelper extends SQLiteOpenHelper {
"FOREIGN KEY(" + TASKS_COLUMN_LIST + ") REFERENCES " + "FOREIGN KEY(" + TASKS_COLUMN_LIST + ") REFERENCES " +
TASKLIST_TABLE_NAME + "(" + COLUMN_ID + ")" + TASKLIST_TABLE_NAME + "(" + COLUMN_ID + ")" +
TASKS_COLUMN_DUEDATE + " DATE, " + TASKS_COLUMN_DUEDATE + " DATE, " +
TASKS_COLUMN_TODAYDATE + " DATE " +
");"; ");";
static final String TASKS_VIEW_TODAY_NAME = "today";
private static final String TASKS_VIEW_TODAY_CREATE =
"CREATE VIEW IF NOT EXISTS " + TASKS_VIEW_TODAY_NAME + " AS" +
" SELECT * FROM " + TASKS_TABLE_NAME +
" WHERE " + TASKS_COLUMN_TODAYDATE + " = date('now')";
DatabaseHelper(Context context) { DatabaseHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION); super(context, DATABASE_NAME, null, DATABASE_VERSION);
} }
@@ -59,21 +66,26 @@ class DatabaseHelper extends SQLiteOpenHelper {
public void onCreate(SQLiteDatabase db) { public void onCreate(SQLiteDatabase db) {
db.execSQL(TASKLIST_TABLE_CREATE); db.execSQL(TASKLIST_TABLE_CREATE);
db.execSQL(TASKS_TABLE_CREATE); db.execSQL(TASKS_TABLE_CREATE);
db.execSQL(TASKS_VIEW_TODAY_CREATE);
} }
@Override @Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
if (oldVersion == 1) // Fall-through is intended
{ switch (oldVersion) {
case 1:
// Add new Order column // Add new Order column
db.execSQL("ALTER TABLE " + TASKLIST_TABLE_NAME + " ADD COLUMN " + COLUMN_ORDER + " INTEGER"); db.execSQL("ALTER TABLE " + TASKLIST_TABLE_NAME + " ADD COLUMN " + COLUMN_ORDER + " INTEGER");
} case 2:
if (oldVersion == 2)
{
// Add new Visible column // Add new Visible column
db.execSQL("ALTER TABLE " + TASKLIST_TABLE_NAME + " ADD COLUMN " + TASKLIST_COLUMN_VISIBLE + " INTEGER DEFAULT 1"); db.execSQL("ALTER TABLE " + TASKLIST_TABLE_NAME + " ADD COLUMN " + TASKLIST_COLUMN_VISIBLE + " INTEGER DEFAULT 1");
// Add new Due Date column // Add new Due Date column
db.execSQL("ALTER TABLE " + TASKS_TABLE_NAME + " ADD COLUMN " + TASKS_COLUMN_DUEDATE + " DATE"); db.execSQL("ALTER TABLE " + TASKS_TABLE_NAME + " ADD COLUMN " + TASKS_COLUMN_DUEDATE + " DATE");
case 3:
// Add new Today Date column
db.execSQL("ALTER TABLE " + TASKS_TABLE_NAME + " ADD COLUMN " + TASKS_COLUMN_TODAYDATE + " DATE");
// Create the Today view
db.execSQL(TASKS_VIEW_TODAY_CREATE);
} }
} }
} }

View File

@@ -30,7 +30,7 @@ public class TaskDataAccess implements AutoCloseable {
DatabaseHelper.TASKS_COLUMN_DESC, DatabaseHelper.TASKS_COLUMN_PRIORITY, DatabaseHelper.TASKS_COLUMN_DESC, DatabaseHelper.TASKS_COLUMN_PRIORITY,
DatabaseHelper.TASKS_COLUMN_CYCLE, DatabaseHelper.TASKS_COLUMN_DONE, DatabaseHelper.TASKS_COLUMN_CYCLE, DatabaseHelper.TASKS_COLUMN_DONE,
DatabaseHelper.TASKS_COLUMN_DELETED, DatabaseHelper.TASKS_COLUMN_LIST, DatabaseHelper.TASKS_COLUMN_DELETED, DatabaseHelper.TASKS_COLUMN_LIST,
DatabaseHelper.TASKS_COLUMN_DUEDATE}; DatabaseHelper.TASKS_COLUMN_DUEDATE, DatabaseHelper.TASKS_COLUMN_TODAYDATE};
public TaskDataAccess(Context context) { public TaskDataAccess(Context context) {
this(context, MODE.READ); this(context, MODE.READ);
@@ -50,16 +50,15 @@ public class TaskDataAccess implements AutoCloseable {
} }
/** Adds or update a task in the database */ /** Adds or update a task in the database */
public Task createOrUpdateTask(long id, String name, String description, int priority, long taskList) { public Task createOrUpdateTask(long id, String name, String description, int priority,
return createOrUpdateTask(id, name, description, priority, taskList, LocalDate.now()); long taskList, LocalDate date, boolean isTodayList) {
}
public Task createOrUpdateTask(long id, String name, String description, int priority, long taskList, LocalDate date) {
ContentValues values = new ContentValues(); ContentValues values = new ContentValues();
values.put(DatabaseHelper.TASKS_COLUMN_NAME, name); values.put(DatabaseHelper.TASKS_COLUMN_NAME, name);
values.put(DatabaseHelper.TASKS_COLUMN_DESC, description); values.put(DatabaseHelper.TASKS_COLUMN_DESC, description);
values.put(DatabaseHelper.TASKS_COLUMN_PRIORITY, priority); values.put(DatabaseHelper.TASKS_COLUMN_PRIORITY, priority);
values.put(DatabaseHelper.TASKS_COLUMN_LIST, taskList); values.put(DatabaseHelper.TASKS_COLUMN_LIST, taskList);
values.put(DatabaseHelper.TASKS_COLUMN_DUEDATE, date.toString()); values.put(DatabaseHelper.TASKS_COLUMN_DUEDATE, date.toString());
values.put(DatabaseHelper.TASKS_COLUMN_TODAYDATE, isTodayList? LocalDate.now().toString() : "");
long insertId; long insertId;
if (id == 0) if (id == 0)
insertId = database.insert(DatabaseHelper.TASKS_TABLE_NAME, null, values); insertId = database.insert(DatabaseHelper.TASKS_TABLE_NAME, null, values);
@@ -76,6 +75,7 @@ public class TaskDataAccess implements AutoCloseable {
return newTask; return newTask;
} }
@Deprecated
public int updateExpiredTasks(int action, long taskListId){ public int updateExpiredTasks(int action, long taskListId){
String column = DatabaseHelper.TASKS_COLUMN_DELETED; String column = DatabaseHelper.TASKS_COLUMN_DELETED;
if (action == 1) if (action == 1)
@@ -91,28 +91,22 @@ public class TaskDataAccess implements AutoCloseable {
} }
public List<Task> getAllTasks(long id) { public List<Task> getAllTasks(long id) {
List<Task> tasks = new ArrayList<>(); Cursor cursor = database.query(DatabaseHelper.TASKS_TABLE_NAME, taskColumns,
Cursor cursor = getAllTasksCursor(id);
cursor.moveToFirst();
while (!cursor.isAfterLast()) {
Task task = cursorToTask(cursor);
tasks.add(task);
cursor.moveToNext();
}
// make sure to close the cursor
cursor.close();
return tasks;
}
private Cursor getAllTasksCursor(long id) {
return database.query(DatabaseHelper.TASKS_TABLE_NAME, taskColumns,
DatabaseHelper.TASKS_COLUMN_LIST + " = " + id + DatabaseHelper.TASKS_COLUMN_LIST + " = " + id +
" AND " + DatabaseHelper.TASKS_COLUMN_DONE + " = " + 0 + " AND " + DatabaseHelper.TASKS_COLUMN_DONE + " = " + 0 +
" AND " + DatabaseHelper.TASKS_COLUMN_DELETED + " = " + 0, " AND " + DatabaseHelper.TASKS_COLUMN_DELETED + " = " + 0,
null, null, null, null, null, null,
DatabaseHelper.TASKS_COLUMN_CYCLE + ", " + DatabaseHelper.COLUMN_ID + " DESC"); DatabaseHelper.TASKS_COLUMN_CYCLE + ", " + DatabaseHelper.COLUMN_ID + " DESC");
return getTasksFromCursor(cursor);
}
public List<Task> getTodayTasks() {
Cursor cursor = database.query(DatabaseHelper.TASKS_VIEW_TODAY_NAME, taskColumns,
DatabaseHelper.TASKS_COLUMN_DONE + " = " + 0 +
" AND " + DatabaseHelper.TASKS_COLUMN_DELETED + " = " + 0,
null, null, null,
DatabaseHelper.TASKS_COLUMN_CYCLE + ", " + DatabaseHelper.COLUMN_ID + " DESC");
return getTasksFromCursor(cursor);
} }
public int setDone(long id) { public int setDone(long id) {
@@ -147,6 +141,21 @@ public class TaskDataAccess implements AutoCloseable {
task.setDeleted(cursor.getInt(6)); task.setDeleted(cursor.getInt(6));
task.setTaskList(cursor.getLong(7)); task.setTaskList(cursor.getLong(7));
task.setDueDate(cursor.getString(8)); task.setDueDate(cursor.getString(8));
task.setTodayDate(cursor.getString(9));
return task; return task;
} }
private List<Task> getTasksFromCursor(Cursor cursor) {
List<Task> tasks = new ArrayList<>();
cursor.moveToFirst();
while (!cursor.isAfterLast()) {
Task task = cursorToTask(cursor);
tasks.add(task);
cursor.moveToNext();
}
// make sure to close the cursor
cursor.close();
return tasks;
}
} }

View File

@@ -18,13 +18,14 @@ import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.Button; import android.widget.Button;
import android.widget.CheckBox;
import android.widget.DatePicker; import android.widget.DatePicker;
import android.widget.EditText; import android.widget.EditText;
import android.widget.SeekBar; import android.widget.SeekBar;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.TextView;
import com.wismna.geoffroy.donext.R; import com.wismna.geoffroy.donext.R;
import com.wismna.geoffroy.donext.dao.Task; import com.wismna.geoffroy.donext.dao.Task;
@@ -210,28 +211,18 @@ public class TaskDialogFragment extends DialogFragment {
// Specify the layout to use when the list of choices appears // Specify the layout to use when the list of choices appears
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapter); spinner.setAdapter(adapter);
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
// Set due date
boolean isRestricted = taskLists.get(position).getName()
.equals(getString(R.string.task_list_today));
dueDatePicker.setEnabled(!isRestricted);
if (isRestricted) {
LocalDate today = LocalDate.now();
dueDatePicker.updateDate(today.getYear(), today.getMonthOfYear() - 1, today.getDayOfMonth());
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {}
});
// Auto set list value to current tab // Auto set list value to current tab
Bundle args = getArguments(); Bundle args = getArguments();
int id = args.getInt("list"); int id = args.getInt("list");
spinner.setSelection(id); spinner.setSelection(id);
CheckBox checkBox = (CheckBox) view.findViewById(R.id.new_task_today);
TextView todayLabel = (TextView) view.findViewById(R.id.new_task_today_label);
boolean isTodayActive = args.getBoolean("today");
checkBox.setVisibility(isTodayActive ? View.VISIBLE : View.GONE);
todayLabel.setVisibility(isTodayActive ? View.VISIBLE : View.GONE);
// Set other properties if they exist // Set other properties if they exist
if (task != null) { if (task != null) {
@@ -245,6 +236,8 @@ public class TaskDialogFragment extends DialogFragment {
// Set Due Date // Set Due Date
LocalDate dueDate = task.getDueDate(); LocalDate dueDate = task.getDueDate();
dueDatePicker.updateDate(dueDate.getYear(), dueDate.getMonthOfYear() - 1, dueDate.getDayOfMonth()); dueDatePicker.updateDate(dueDate.getYear(), dueDate.getMonthOfYear() - 1, dueDate.getDayOfMonth());
checkBox.setChecked(task.isToday());
} }
else { else {
// Disallow past dates on new tasks // Disallow past dates on new tasks

View File

@@ -70,10 +70,6 @@ public class TaskListsFragment extends Fragment implements
editText.setError(getResources().getString(R.string.task_list_new_list_error)); editText.setError(getResources().getString(R.string.task_list_new_list_error));
return; return;
} }
else if (text.matches(getString(R.string.task_list_today))) {
editText.setError(getResources().getString(R.string.task_list_today_list_error));
return;
}
int position = taskListRecyclerViewAdapter.getItemCount(); int position = taskListRecyclerViewAdapter.getItemCount();
TaskList taskList = taskListDataAccess.createTaskList(text, position); TaskList taskList = taskListDataAccess.createTaskList(text, position);
@@ -196,7 +192,7 @@ public class TaskListsFragment extends Fragment implements
protected void onPostExecute(List<TaskList> taskLists) { protected void onPostExecute(List<TaskList> taskLists) {
super.onPostExecute(taskLists); super.onPostExecute(taskLists);
taskListRecyclerViewAdapter = taskListRecyclerViewAdapter =
new TaskListRecyclerViewAdapter(taskLists, TaskListsFragment.this, getString(R.string.task_list_today)); new TaskListRecyclerViewAdapter(taskLists, TaskListsFragment.this);
// Set the adapter // Set the adapter
Context context = mView.getContext(); Context context = mView.getContext();

View File

@@ -30,6 +30,7 @@ import com.wismna.geoffroy.donext.adapters.TaskRecyclerViewAdapter;
import com.wismna.geoffroy.donext.dao.Task; import com.wismna.geoffroy.donext.dao.Task;
import com.wismna.geoffroy.donext.dao.TaskList; import com.wismna.geoffroy.donext.dao.TaskList;
import com.wismna.geoffroy.donext.database.TaskDataAccess; import com.wismna.geoffroy.donext.database.TaskDataAccess;
import com.wismna.geoffroy.donext.database.TaskListDataAccess;
import com.wismna.geoffroy.donext.helpers.TaskTouchHelper; import com.wismna.geoffroy.donext.helpers.TaskTouchHelper;
import com.wismna.geoffroy.donext.listeners.RecyclerItemClickListener; import com.wismna.geoffroy.donext.listeners.RecyclerItemClickListener;
import com.wismna.geoffroy.donext.widgets.DividerItemDecoration; import com.wismna.geoffroy.donext.widgets.DividerItemDecoration;
@@ -37,6 +38,8 @@ import com.wismna.geoffroy.donext.widgets.NoScrollingLayoutManager;
import org.joda.time.LocalDate; import org.joda.time.LocalDate;
import java.util.List;
/** /**
* A fragment representing a list of Items. * A fragment representing a list of Items.
*/ */
@@ -50,10 +53,9 @@ public class TasksFragment extends Fragment implements
} }
private static final String TASK_LIST_ID = "task_list_id"; private static final String TASK_LIST_ID = "task_list_id";
private static final String CLEAR_EXPIRED_TASKS = "clear_expired_tasks";
private long taskListId = -1; private long taskListId = -1;
private boolean clearExpiredTasks = false;
private boolean mIsLargeLayout; private boolean mIsLargeLayout;
private boolean isTodayView = true;
private TaskRecyclerViewAdapter taskRecyclerViewAdapter; private TaskRecyclerViewAdapter taskRecyclerViewAdapter;
private View view; private View view;
private RecyclerView recyclerView; private RecyclerView recyclerView;
@@ -67,13 +69,13 @@ public class TasksFragment extends Fragment implements
public TasksFragment() { public TasksFragment() {
} }
public static TasksFragment newInstance(long taskListId, boolean clearExpiredTasks, TaskChangedAdapter taskChangedAdapter) { public static TasksFragment newTaskListInstance(long taskListId, TaskChangedAdapter taskChangedAdapter) {
TasksFragment fragment = new TasksFragment(); TasksFragment fragment = new TasksFragment();
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putLong(TASK_LIST_ID, taskListId); args.putLong(TASK_LIST_ID, taskListId);
args.putBoolean(CLEAR_EXPIRED_TASKS, clearExpiredTasks);
fragment.setArguments(args); fragment.setArguments(args);
fragment.mAdapter = taskChangedAdapter; fragment.mAdapter = taskChangedAdapter;
fragment.isTodayView = false;
fragment.setRetainInstance(true); fragment.setRetainInstance(true);
return fragment; return fragment;
} }
@@ -85,7 +87,6 @@ public class TasksFragment extends Fragment implements
mIsLargeLayout = getResources().getBoolean(R.bool.large_layout); mIsLargeLayout = getResources().getBoolean(R.bool.large_layout);
if (getArguments() != null) { if (getArguments() != null) {
taskListId = getArguments().getLong(TASK_LIST_ID); taskListId = getArguments().getLong(TASK_LIST_ID);
clearExpiredTasks = getArguments().getBoolean(CLEAR_EXPIRED_TASKS);
} }
} }
@@ -102,17 +103,10 @@ public class TasksFragment extends Fragment implements
// Set RecyclerView Adapter // Set RecyclerView Adapter
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getContext()); SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getContext());
// Mark all tasks with an earlier do date as done
if (clearExpiredTasks) {
try (TaskDataAccess taskDataAccess = new TaskDataAccess(view.getContext(), TaskDataAccess.MODE.WRITE)) {
taskDataAccess.updateExpiredTasks(
Integer.valueOf(sharedPref.getString("pref_conf_today_action", "2")), taskListId);
}
}
// Get all tasks // Get all tasks
try (TaskDataAccess taskDataAccess = new TaskDataAccess(view.getContext())) { try (TaskDataAccess taskDataAccess = new TaskDataAccess(view.getContext())) {
taskRecyclerViewAdapter = new TaskRecyclerViewAdapter( taskRecyclerViewAdapter = new TaskRecyclerViewAdapter(
taskDataAccess.getAllTasks(taskListId), isTodayView? taskDataAccess.getTodayTasks() : taskDataAccess.getAllTasks(taskListId),
Integer.valueOf(sharedPref.getString("pref_conf_task_layout", "1"))); Integer.valueOf(sharedPref.getString("pref_conf_task_layout", "1")));
} }
recyclerView.setAdapter(taskRecyclerViewAdapter); recyclerView.setAdapter(taskRecyclerViewAdapter);
@@ -127,19 +121,36 @@ public class TasksFragment extends Fragment implements
new RecyclerItemClickListener(context, new RecyclerItemClickListener.OnItemClickListener() { new RecyclerItemClickListener(context, new RecyclerItemClickListener.OnItemClickListener() {
@Override @Override
public void onItemClick(View view, int position) { public void onItemClick(View view, int position) {
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getContext());
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putInt("position", position); args.putInt("position", position);
args.putBoolean("layout", mIsLargeLayout); args.putBoolean("layout", mIsLargeLayout);
args.putBoolean("today", sharedPref.getBoolean("pref_conf_today_enable", false));
// Set current tab value to new task dialog // Set current tab value to new task dialog
ViewPager viewPager = (ViewPager) getActivity().findViewById(R.id.container); ViewPager viewPager = (ViewPager) getActivity().findViewById(R.id.container);
List<TaskList> taskLists;
Task task = taskRecyclerViewAdapter.getItem(position);
if (viewPager != null) {
taskLists = ((MainActivity.SectionsPagerAdapter) viewPager.getAdapter()).getAllItems();
args.putInt("list", viewPager.getCurrentItem()); args.putInt("list", viewPager.getCurrentItem());
}
else {
try (TaskListDataAccess taskListDataAccess = new TaskListDataAccess(getActivity())) {
taskLists = taskListDataAccess.getAllTaskLists();
}
for (TaskList taskList :
taskLists) {
if (taskList.getId() == task.getTaskListId()) {
args.putInt("list", taskLists.indexOf(taskList));
break;
}
}
}
FragmentManager manager = getFragmentManager(); FragmentManager manager = getFragmentManager();
TaskDialogFragment taskDialogFragment = TaskDialogFragment.newInstance( TaskDialogFragment taskDialogFragment = TaskDialogFragment.newInstance(
taskRecyclerViewAdapter.getItem(position), task, taskLists, TasksFragment.this);
((MainActivity.SectionsPagerAdapter) viewPager.getAdapter()).getAllItems(),
TasksFragment.this);
taskDialogFragment.setArguments(args); taskDialogFragment.setArguments(args);
// Open the fragment as a dialog or as full-screen depending on screen size // Open the fragment as a dialog or as full-screen depending on screen size
@@ -334,6 +345,7 @@ public class TasksFragment extends Fragment implements
SeekBar seekBar = (SeekBar) dialogView.findViewById(R.id.new_task_priority); SeekBar seekBar = (SeekBar) dialogView.findViewById(R.id.new_task_priority);
DatePicker dueDatePicker = (DatePicker) dialogView.findViewById(R.id.new_task_due_date); DatePicker dueDatePicker = (DatePicker) dialogView.findViewById(R.id.new_task_due_date);
TaskList taskList = (TaskList) listSpinner.getSelectedItem(); TaskList taskList = (TaskList) listSpinner.getSelectedItem();
CheckBox todayList = (CheckBox) dialogView.findViewById(R.id.new_task_today);
// Add the task to the database // Add the task to the database
try (TaskDataAccess taskDataAccess = new TaskDataAccess(view.getContext(), TaskDataAccess.MODE.WRITE)) { try (TaskDataAccess taskDataAccess = new TaskDataAccess(view.getContext(), TaskDataAccess.MODE.WRITE)) {
@@ -342,7 +354,8 @@ public class TasksFragment extends Fragment implements
descText.getText().toString(), descText.getText().toString(),
seekBar.getProgress(), seekBar.getProgress(),
taskList.getId(), taskList.getId(),
new LocalDate(dueDatePicker.getYear(), dueDatePicker.getMonth() + 1, dueDatePicker.getDayOfMonth())); new LocalDate(dueDatePicker.getYear(), dueDatePicker.getMonth() + 1, dueDatePicker.getDayOfMonth()),
todayList.isChecked());
Bundle args = dialog.getArguments(); Bundle args = dialog.getArguments();
// Should never happen because we will have to be on this tab to open the dialog // Should never happen because we will have to be on this tab to open the dialog
@@ -351,7 +364,7 @@ public class TasksFragment extends Fragment implements
// Add the task // Add the task
if (task == null) { if (task == null) {
// If the new task is added to another task list, update the tab // If the new task is added to another task list, update the tab
if (taskListId != taskList.getId()) { if (mAdapter != null && taskListId != taskList.getId()) {
mAdapter.onTaskListChanged(newTask, listSpinner.getSelectedItemPosition()); mAdapter.onTaskListChanged(newTask, listSpinner.getSelectedItemPosition());
} }
// Otherwise add it to the current one // Otherwise add it to the current one
@@ -364,7 +377,7 @@ public class TasksFragment extends Fragment implements
else { else {
int position = args.getInt("position"); int position = args.getInt("position");
// Check if task list was changed // Check if task list was changed
if (task.getTaskListId() != taskList.getId()) if (mAdapter != null && task.getTaskListId() != taskList.getId())
{ {
// Remove item from current tab // Remove item from current tab
taskRecyclerViewAdapter.remove(position); taskRecyclerViewAdapter.remove(position);

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 961 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

View File

@@ -51,12 +51,4 @@
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> 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="@drawable/ic_add_white_24dp" />
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<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"
tools:context="com.wismna.geoffroy.donext.activities.TodayActivity">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/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>
<fragment
android:name="com.wismna.geoffroy.donext.fragments.TasksFragment"
android:id="@+id/fragment_task_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:layout="@layout/fragment_tasks" />
</android.support.design.widget.CoordinatorLayout>

View File

@@ -77,6 +77,20 @@
android:layout_height="30dp" android:layout_height="30dp"
android:layout_toEndOf="@id/new_task_priority_label" android:layout_toEndOf="@id/new_task_priority_label"
android:layout_below="@id/new_task_description" /> 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 <TextView
android:id="@+id/new_task_due_date_label" android:id="@+id/new_task_due_date_label"
android:text="@string/new_task_due_date" android:text="@string/new_task_due_date"
@@ -84,7 +98,7 @@
android:layout_width="200dp" android:layout_width="200dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_below="@id/new_task_priority" /> android:layout_below="@id/new_task_today" />
<DatePicker <DatePicker
android:id="@+id/new_task_due_date" android:id="@+id/new_task_due_date"
android:datePickerMode="spinner" android:datePickerMode="spinner"

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.widget.RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -13,7 +13,7 @@
android:id="@+id/total_task_count" android:id="@+id/total_task_count"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true"/> android:layout_gravity="top|center"/>
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/task_list_view" android:id="@+id/task_list_view"
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -62,6 +62,15 @@
android:id="@+id/remaining_task_count" android:id="@+id/remaining_task_count"
android:layout_width="150dp" android:layout_width="150dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_gravity="bottom|center"/>
android:layout_below="@id/task_list_view"/>
</android.widget.RelativeLayout> <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="@drawable/ic_add_white_24dp" />
</android.support.design.widget.CoordinatorLayout>

View File

@@ -6,4 +6,5 @@
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary" android:background="?attr/colorPrimary"
app:layout_scrollFlags="enterAlways" app:layout_scrollFlags="enterAlways"
app:popupTheme="@style/AppTheme.PopupOverlay" /> android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

View File

@@ -8,6 +8,14 @@
android:title="@string/action_new_task" android:title="@string/action_new_task"
android:onClick="openNewTaskDialog" android:onClick="openNewTaskDialog"
app:showAsAction="never" />--> app:showAsAction="never" />-->
<item
android:id="@+id/action_todayList"
android:orderInCategory="15"
android:title="@string/action_todayList"
android:onClick="showTodayList"
android:icon="@drawable/ic_stat_name"
android:visible="false"
app:showAsAction="ifRoom" />
<item <item
android:id="@+id/action_changeLayout" android:id="@+id/action_changeLayout"
android:orderInCategory="20" android:orderInCategory="20"

View File

@@ -67,4 +67,7 @@
<string name="settings_today_action_title">Action à entreprendre à la fin de la journée:</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="new_task_due_date">Date de fin</string>
<string name="task_alarm">Task is past due date</string> <string name="task_alarm">Task is past due date</string>
<string name="action_todayList">Vue Aujourd\'hui</string>
<string name="title_activity_today">Aujourd\'hui</string>
<string name="new_task_today">Ajouter la tâche à la vue Aujourd\'hui?</string>
</resources> </resources>

View File

@@ -85,4 +85,8 @@
<string name="about_version_donext">DoNext version %s</string> <string name="about_version_donext">DoNext version %s</string>
<string name="about_version_android">Android version %d</string> <string name="about_version_android">Android version %d</string>
<string name="about_link" translatable="false">https://github.com/wismna</string> <string name="about_link" translatable="false">https://github.com/wismna</string>
<string name="action_todayList">Today View</string>
<string name="title_activity_today">Today</string>
<string name="new_task_today">Add task to Today View?</string>
<string name="title_activity_main2">Main2Activity</string>
</resources> </resources>