diff --git a/DoNExt/.idea/dictionaries/bg45.xml b/DoNExt/.idea/dictionaries/bg45.xml new file mode 100644 index 0000000..f4f7921 --- /dev/null +++ b/DoNExt/.idea/dictionaries/bg45.xml @@ -0,0 +1,7 @@ + + + + geoffroy + + + \ No newline at end of file diff --git a/DoNExt/.idea/misc.xml b/DoNExt/.idea/misc.xml index fbb6828..5d19981 100644 --- a/DoNExt/.idea/misc.xml +++ b/DoNExt/.idea/misc.xml @@ -37,7 +37,7 @@ - + diff --git a/DoNExt/app/build.gradle b/DoNExt/app/build.gradle index 8b8e65e..4912e18 100644 --- a/DoNExt/app/build.gradle +++ b/DoNExt/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "com.wismna.geoffroy.donext" minSdkVersion 19 targetSdkVersion 25 - versionCode 14 - versionName "1.3.0" + versionCode 15 + versionName "1.4.0" } buildTypes { release { @@ -21,7 +21,6 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:25.3.0' compile 'com.android.support:design: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.google.android.gms:play-services-ads:10.2.0' compile 'net.danlew:android.joda:2.9.7' + testCompile 'junit:junit:4.12' } diff --git a/DoNExt/app/src/main/AndroidManifest.xml b/DoNExt/app/src/main/AndroidManifest.xml index 5499f44..be58329 100644 --- a/DoNExt/app/src/main/AndroidManifest.xml +++ b/DoNExt/app/src/main/AndroidManifest.xml @@ -1,26 +1,28 @@ + - + android:smallScreens="true" /> + + android:theme="@style/AppTheme"> + android:theme="@style/AppTheme.NoActionBar" + android:windowSoftInputMode="stateAlwaysHidden"> + @@ -48,5 +50,15 @@ android:name="android.support.PARENT_ACTIVITY" android:value=".activities.MainActivity" /> + + + - + + \ No newline at end of file diff --git a/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/activities/MainActivity.java b/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/activities/MainActivity.java index 3eeba04..ad2dbec 100644 --- a/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/activities/MainActivity.java +++ b/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/activities/MainActivity.java @@ -6,7 +6,6 @@ import android.graphics.Point; import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.design.widget.FloatingActionButton; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; @@ -69,9 +68,6 @@ public class MainActivity extends AppCompatActivity implements TasksFragment.Tas SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(MainActivity.this); - // Handle Today list - handleTodayList(sharedPref); - // Access database to retrieve Tabs try (TaskListDataAccess taskListDataAccess = new TaskListDataAccess(this)) { 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 public boolean onPrepareOptionsMenu(Menu menu) { - MenuItem item = menu.findItem(R.id.action_changeLayout); - if (item == null) return false; + // Handles layout change button + MenuItem displayLayoutItem = menu.findItem(R.id.action_changeLayout); + if (displayLayoutItem == null) return false; SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this); String layoutType = sharedPref.getString("pref_conf_task_layout", "1"); switch (layoutType) { case "1" : - item.setIcon(R.drawable.ic_list_white_24dp); + displayLayoutItem.setIcon(R.drawable.ic_list_white_24dp); break; case "2" : - item.setIcon(R.drawable.ic_view_list_white_24dp); + displayLayoutItem.setIcon(R.drawable.ic_view_list_white_24dp); 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); } @@ -191,9 +189,11 @@ public class MainActivity extends AppCompatActivity implements TasksFragment.Tas FragmentManager fragmentManager = getSupportFragmentManager(); // Set current tab value to new task dialog + SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this); Bundle args = new Bundle(); args.putInt("list", currentTabPosition); args.putBoolean("layout", mIsLargeLayout); + args.putBoolean("today", sharedPref.getBoolean("pref_conf_today_enable", false)); taskDialogFragment.setArguments(args); 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 */ public void changeLayout(MenuItem item) { 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 * 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. // Return a PlaceholderFragment (defined as a static inner class below). TaskList taskList = taskLists.get(position); - return TasksFragment.newInstance(taskList.getId(), - taskList.getName().equals(getString(R.string.task_list_today)), MainActivity.this); + return TasksFragment.newTaskListInstance(taskList.getId(), MainActivity.this); } @Override diff --git a/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/activities/TodayActivity.java b/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/activities/TodayActivity.java new file mode 100644 index 0000000..da6d32c --- /dev/null +++ b/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/activities/TodayActivity.java @@ -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) { + } +} diff --git a/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/adapters/TaskListRecyclerViewAdapter.java b/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/adapters/TaskListRecyclerViewAdapter.java index 851475d..af00110 100644 --- a/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/adapters/TaskListRecyclerViewAdapter.java +++ b/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/adapters/TaskListRecyclerViewAdapter.java @@ -17,7 +17,6 @@ import com.wismna.geoffroy.donext.helpers.TaskListTouchHelper; import java.util.Collections; import java.util.List; -import java.util.Objects; /** * {@link RecyclerView.Adapter} that can display a {@link TaskList}. @@ -35,14 +34,11 @@ public class TaskListRecyclerViewAdapter extends RecyclerView.Adapter mValues; private TaskListRecyclerViewAdapterListener mListener; - private String mReservedTaskListName; public TaskListRecyclerViewAdapter(List items, - TaskListRecyclerViewAdapterListener listener, - String reservedTaskListName) { + TaskListRecyclerViewAdapterListener listener) { mValues = items; mListener = listener; - mReservedTaskListName = reservedTaskListName; } @Override @@ -70,10 +66,8 @@ public class TaskListRecyclerViewAdapter extends RecyclerView.Adapter getAllTasks(long id) { - List tasks = new ArrayList<>(); - - 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, + Cursor cursor = database.query(DatabaseHelper.TASKS_TABLE_NAME, taskColumns, DatabaseHelper.TASKS_COLUMN_LIST + " = " + id + - " AND " + DatabaseHelper.TASKS_COLUMN_DONE + " = " + 0 + - " AND " + DatabaseHelper.TASKS_COLUMN_DELETED + " = " + 0, + " AND " + 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 List 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) { @@ -147,6 +141,21 @@ public class TaskDataAccess implements AutoCloseable { task.setDeleted(cursor.getInt(6)); task.setTaskList(cursor.getLong(7)); task.setDueDate(cursor.getString(8)); + task.setTodayDate(cursor.getString(9)); return task; } + + private List getTasksFromCursor(Cursor cursor) { + List 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; + } } diff --git a/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/fragments/TaskDialogFragment.java b/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/fragments/TaskDialogFragment.java index fc9551b..d21a17c 100644 --- a/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/fragments/TaskDialogFragment.java +++ b/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/fragments/TaskDialogFragment.java @@ -18,13 +18,14 @@ import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.view.inputmethod.InputMethodManager; -import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; +import android.widget.CheckBox; import android.widget.DatePicker; import android.widget.EditText; import android.widget.SeekBar; import android.widget.Spinner; +import android.widget.TextView; import com.wismna.geoffroy.donext.R; 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 adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); 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 Bundle args = getArguments(); int id = args.getInt("list"); 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 if (task != null) { @@ -245,6 +236,8 @@ public class TaskDialogFragment extends DialogFragment { // Set Due Date LocalDate dueDate = task.getDueDate(); dueDatePicker.updateDate(dueDate.getYear(), dueDate.getMonthOfYear() - 1, dueDate.getDayOfMonth()); + + checkBox.setChecked(task.isToday()); } else { // Disallow past dates on new tasks diff --git a/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/fragments/TaskListsFragment.java b/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/fragments/TaskListsFragment.java index f67ddeb..6fc7537 100644 --- a/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/fragments/TaskListsFragment.java +++ b/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/fragments/TaskListsFragment.java @@ -70,10 +70,6 @@ public class TaskListsFragment extends Fragment implements editText.setError(getResources().getString(R.string.task_list_new_list_error)); 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(); TaskList taskList = taskListDataAccess.createTaskList(text, position); @@ -196,7 +192,7 @@ public class TaskListsFragment extends Fragment implements protected void onPostExecute(List taskLists) { super.onPostExecute(taskLists); taskListRecyclerViewAdapter = - new TaskListRecyclerViewAdapter(taskLists, TaskListsFragment.this, getString(R.string.task_list_today)); + new TaskListRecyclerViewAdapter(taskLists, TaskListsFragment.this); // Set the adapter Context context = mView.getContext(); diff --git a/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/fragments/TasksFragment.java b/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/fragments/TasksFragment.java index f320be8..6d593e2 100644 --- a/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/fragments/TasksFragment.java +++ b/DoNExt/app/src/main/java/com/wismna/geoffroy/donext/fragments/TasksFragment.java @@ -30,6 +30,7 @@ import com.wismna.geoffroy.donext.adapters.TaskRecyclerViewAdapter; import com.wismna.geoffroy.donext.dao.Task; import com.wismna.geoffroy.donext.dao.TaskList; 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.listeners.RecyclerItemClickListener; import com.wismna.geoffroy.donext.widgets.DividerItemDecoration; @@ -37,6 +38,8 @@ import com.wismna.geoffroy.donext.widgets.NoScrollingLayoutManager; import org.joda.time.LocalDate; +import java.util.List; + /** * 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 CLEAR_EXPIRED_TASKS = "clear_expired_tasks"; private long taskListId = -1; - private boolean clearExpiredTasks = false; private boolean mIsLargeLayout; + private boolean isTodayView = true; private TaskRecyclerViewAdapter taskRecyclerViewAdapter; private View view; private RecyclerView recyclerView; @@ -67,13 +69,13 @@ public class TasksFragment extends Fragment implements public TasksFragment() { } - public static TasksFragment newInstance(long taskListId, boolean clearExpiredTasks, TaskChangedAdapter taskChangedAdapter) { + public static TasksFragment newTaskListInstance(long taskListId, TaskChangedAdapter taskChangedAdapter) { TasksFragment fragment = new TasksFragment(); Bundle args = new Bundle(); args.putLong(TASK_LIST_ID, taskListId); - args.putBoolean(CLEAR_EXPIRED_TASKS, clearExpiredTasks); fragment.setArguments(args); fragment.mAdapter = taskChangedAdapter; + fragment.isTodayView = false; fragment.setRetainInstance(true); return fragment; } @@ -85,7 +87,6 @@ public class TasksFragment extends Fragment implements mIsLargeLayout = getResources().getBoolean(R.bool.large_layout); if (getArguments() != null) { 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 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 try (TaskDataAccess taskDataAccess = new TaskDataAccess(view.getContext())) { taskRecyclerViewAdapter = new TaskRecyclerViewAdapter( - taskDataAccess.getAllTasks(taskListId), + isTodayView? taskDataAccess.getTodayTasks() : taskDataAccess.getAllTasks(taskListId), Integer.valueOf(sharedPref.getString("pref_conf_task_layout", "1"))); } recyclerView.setAdapter(taskRecyclerViewAdapter); @@ -127,19 +121,36 @@ public class TasksFragment extends Fragment implements new RecyclerItemClickListener(context, new RecyclerItemClickListener.OnItemClickListener() { @Override public void onItemClick(View view, int position) { + SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getContext()); Bundle args = new Bundle(); args.putInt("position", position); args.putBoolean("layout", mIsLargeLayout); + args.putBoolean("today", sharedPref.getBoolean("pref_conf_today_enable", false)); // Set current tab value to new task dialog ViewPager viewPager = (ViewPager) getActivity().findViewById(R.id.container); - args.putInt("list", viewPager.getCurrentItem()); + List taskLists; + Task task = taskRecyclerViewAdapter.getItem(position); + if (viewPager != null) { + taskLists = ((MainActivity.SectionsPagerAdapter) viewPager.getAdapter()).getAllItems(); + 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(); TaskDialogFragment taskDialogFragment = TaskDialogFragment.newInstance( - taskRecyclerViewAdapter.getItem(position), - ((MainActivity.SectionsPagerAdapter) viewPager.getAdapter()).getAllItems(), - TasksFragment.this); + task, taskLists, TasksFragment.this); taskDialogFragment.setArguments(args); // 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); DatePicker dueDatePicker = (DatePicker) dialogView.findViewById(R.id.new_task_due_date); TaskList taskList = (TaskList) listSpinner.getSelectedItem(); + CheckBox todayList = (CheckBox) dialogView.findViewById(R.id.new_task_today); // Add the task to the database try (TaskDataAccess taskDataAccess = new TaskDataAccess(view.getContext(), TaskDataAccess.MODE.WRITE)) { @@ -342,7 +354,8 @@ public class TasksFragment extends Fragment implements descText.getText().toString(), seekBar.getProgress(), 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(); // 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 if (task == null) { // 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()); } // Otherwise add it to the current one @@ -364,7 +377,7 @@ public class TasksFragment extends Fragment implements else { int position = args.getInt("position"); // Check if task list was changed - if (task.getTaskListId() != taskList.getId()) + if (mAdapter != null && task.getTaskListId() != taskList.getId()) { // Remove item from current tab taskRecyclerViewAdapter.remove(position); diff --git a/DoNExt/app/src/main/res/drawable-hdpi-v11/ic_stat_name.png b/DoNExt/app/src/main/res/drawable-hdpi-v11/ic_stat_name.png new file mode 100644 index 0000000..44943ec Binary files /dev/null and b/DoNExt/app/src/main/res/drawable-hdpi-v11/ic_stat_name.png differ diff --git a/DoNExt/app/src/main/res/drawable-hdpi-v9/ic_stat_name.png b/DoNExt/app/src/main/res/drawable-hdpi-v9/ic_stat_name.png new file mode 100644 index 0000000..b007611 Binary files /dev/null and b/DoNExt/app/src/main/res/drawable-hdpi-v9/ic_stat_name.png differ diff --git a/DoNExt/app/src/main/res/drawable-hdpi/ic_stat_name.png b/DoNExt/app/src/main/res/drawable-hdpi/ic_stat_name.png new file mode 100644 index 0000000..ae47ddf Binary files /dev/null and b/DoNExt/app/src/main/res/drawable-hdpi/ic_stat_name.png differ diff --git a/DoNExt/app/src/main/res/drawable-mdpi-v11/ic_stat_name.png b/DoNExt/app/src/main/res/drawable-mdpi-v11/ic_stat_name.png new file mode 100644 index 0000000..8c9c68d Binary files /dev/null and b/DoNExt/app/src/main/res/drawable-mdpi-v11/ic_stat_name.png differ diff --git a/DoNExt/app/src/main/res/drawable-mdpi-v9/ic_stat_name.png b/DoNExt/app/src/main/res/drawable-mdpi-v9/ic_stat_name.png new file mode 100644 index 0000000..9a740c4 Binary files /dev/null and b/DoNExt/app/src/main/res/drawable-mdpi-v9/ic_stat_name.png differ diff --git a/DoNExt/app/src/main/res/drawable-mdpi/ic_stat_name.png b/DoNExt/app/src/main/res/drawable-mdpi/ic_stat_name.png new file mode 100644 index 0000000..c7c3474 Binary files /dev/null and b/DoNExt/app/src/main/res/drawable-mdpi/ic_stat_name.png differ diff --git a/DoNExt/app/src/main/res/drawable-xhdpi-v11/ic_stat_name.png b/DoNExt/app/src/main/res/drawable-xhdpi-v11/ic_stat_name.png new file mode 100644 index 0000000..53b008f Binary files /dev/null and b/DoNExt/app/src/main/res/drawable-xhdpi-v11/ic_stat_name.png differ diff --git a/DoNExt/app/src/main/res/drawable-xhdpi-v9/ic_stat_name.png b/DoNExt/app/src/main/res/drawable-xhdpi-v9/ic_stat_name.png new file mode 100644 index 0000000..961114c Binary files /dev/null and b/DoNExt/app/src/main/res/drawable-xhdpi-v9/ic_stat_name.png differ diff --git a/DoNExt/app/src/main/res/drawable-xhdpi/ic_stat_name.png b/DoNExt/app/src/main/res/drawable-xhdpi/ic_stat_name.png new file mode 100644 index 0000000..68b0ef7 Binary files /dev/null and b/DoNExt/app/src/main/res/drawable-xhdpi/ic_stat_name.png differ diff --git a/DoNExt/app/src/main/res/drawable-xxhdpi-v11/ic_stat_name.png b/DoNExt/app/src/main/res/drawable-xxhdpi-v11/ic_stat_name.png new file mode 100644 index 0000000..dff11a5 Binary files /dev/null and b/DoNExt/app/src/main/res/drawable-xxhdpi-v11/ic_stat_name.png differ diff --git a/DoNExt/app/src/main/res/drawable-xxhdpi-v9/ic_stat_name.png b/DoNExt/app/src/main/res/drawable-xxhdpi-v9/ic_stat_name.png new file mode 100644 index 0000000..f21073b Binary files /dev/null and b/DoNExt/app/src/main/res/drawable-xxhdpi-v9/ic_stat_name.png differ diff --git a/DoNExt/app/src/main/res/drawable-xxhdpi/ic_stat_name.png b/DoNExt/app/src/main/res/drawable-xxhdpi/ic_stat_name.png new file mode 100644 index 0000000..6cf7492 Binary files /dev/null and b/DoNExt/app/src/main/res/drawable-xxhdpi/ic_stat_name.png differ diff --git a/DoNExt/app/src/main/res/layout/activity_main.xml b/DoNExt/app/src/main/res/layout/activity_main.xml index 0730c32..35ce83d 100644 --- a/DoNExt/app/src/main/res/layout/activity_main.xml +++ b/DoNExt/app/src/main/res/layout/activity_main.xml @@ -51,12 +51,4 @@ android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" /> - diff --git a/DoNExt/app/src/main/res/layout/activity_today.xml b/DoNExt/app/src/main/res/layout/activity_today.xml new file mode 100644 index 0000000..acd8e0b --- /dev/null +++ b/DoNExt/app/src/main/res/layout/activity_today.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/DoNExt/app/src/main/res/layout/fragment_task_form.xml b/DoNExt/app/src/main/res/layout/fragment_task_form.xml index 250d430..b5ce149 100644 --- a/DoNExt/app/src/main/res/layout/fragment_task_form.xml +++ b/DoNExt/app/src/main/res/layout/fragment_task_form.xml @@ -77,6 +77,20 @@ android:layout_height="30dp" android:layout_toEndOf="@id/new_task_priority_label" android:layout_below="@id/new_task_description" /> + + + android:layout_below="@id/new_task_today" /> - + android:layout_gravity="top|center"/> - \ No newline at end of file + android:layout_gravity="bottom|center"/> + + + + \ No newline at end of file diff --git a/DoNExt/app/src/main/res/layout/toolbar.xml b/DoNExt/app/src/main/res/layout/toolbar.xml index bb1ff95..7e2f443 100644 --- a/DoNExt/app/src/main/res/layout/toolbar.xml +++ b/DoNExt/app/src/main/res/layout/toolbar.xml @@ -6,4 +6,5 @@ android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:layout_scrollFlags="enterAlways" - app:popupTheme="@style/AppTheme.PopupOverlay" /> \ No newline at end of file + android:theme="@style/ThemeOverlay.AppCompat.ActionBar" + app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> \ No newline at end of file diff --git a/DoNExt/app/src/main/res/menu/menu_main.xml b/DoNExt/app/src/main/res/menu/menu_main.xml index 2851020..4f50023 100644 --- a/DoNExt/app/src/main/res/menu/menu_main.xml +++ b/DoNExt/app/src/main/res/menu/menu_main.xml @@ -8,6 +8,14 @@ android:title="@string/action_new_task" android:onClick="openNewTaskDialog" app:showAsAction="never" />--> + Action à entreprendre à la fin de la journée: Date de fin Task is past due date + Vue Aujourd\'hui + Aujourd\'hui + Ajouter la tâche à la vue Aujourd\'hui? \ No newline at end of file diff --git a/DoNExt/app/src/main/res/values/strings.xml b/DoNExt/app/src/main/res/values/strings.xml index def7701..c610eff 100644 --- a/DoNExt/app/src/main/res/values/strings.xml +++ b/DoNExt/app/src/main/res/values/strings.xml @@ -85,4 +85,8 @@ DoNext version %s Android version %d https://github.com/wismna + Today View + Today + Add task to Today View? + Main2Activity