Loading opentasks/src/main/java/org/dmfs/tasks/EditTaskActivity.java +2 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ import android.os.Bundle; import androidx.fragment.app.Fragment; import androidx.core.app.NavUtils; import androidx.appcompat.app.ActionBar; import android.util.Log; import android.view.Menu; import android.view.MenuItem; Loading opentasks/src/main/java/org/dmfs/tasks/QuickAddDialogFragment.java +6 −4 Original line number Diff line number Diff line Loading @@ -142,7 +142,7 @@ public class QuickAddDialogFragment extends SupportDialogFragment private View mConfirmation; private View mContent; private View mSaveButton; private TextView mSaveButton; private View mSaveAndNextButton; private TasksListCursorSpinnerAdapter mTaskListAdapter; Loading Loading @@ -221,7 +221,8 @@ public class QuickAddDialogFragment extends SupportDialogFragment } mColorBackground = view.findViewById(R.id.color_background); mColorBackground.setBackgroundColor(mLastColor); mColorBackground.setBackgroundColor(TaskListActivity.ACCENT_COLOR); mListSpinner = (Spinner) view.findViewById(R.id.task_list_spinner); mTaskListAdapter = new TasksListCursorSpinnerAdapter(getActivity(), R.layout.list_spinner_item_selected_quick_add, R.layout.list_spinner_item_dropdown); Loading @@ -237,7 +238,8 @@ public class QuickAddDialogFragment extends SupportDialogFragment mConfirmation = view.findViewById(R.id.created_confirmation); mContent = view.findViewById(R.id.content); mSaveButton = view.findViewById(android.R.id.button1); mSaveButton = (TextView)view.findViewById(android.R.id.button1); mSaveButton.setTextColor(TaskListActivity.ACCENT_COLOR); mSaveButton.setOnClickListener(this); mSaveAndNextButton = view.findViewById(android.R.id.button2); mSaveAndNextButton.setOnClickListener(this); Loading Loading @@ -326,7 +328,7 @@ public class QuickAddDialogFragment extends SupportDialogFragment { Cursor c = (Cursor) parent.getItemAtPosition(position); mLastColor = TaskFieldAdapters.LIST_COLOR.get(c); mColorBackground.setBackgroundColor(mLastColor); mColorBackground.setBackgroundColor(TaskListActivity.ACCENT_COLOR); mSelectedListId = id; } Loading opentasks/src/main/java/org/dmfs/tasks/TaskListActivity.java +4 −1 Original line number Diff line number Diff line Loading @@ -187,6 +187,7 @@ public class TaskListActivity extends BaseActivity implements TaskListFragment.C private AppBarLayout mAppBarLayout; private FloatingActionButton mFloatingActionButton; public static int ACCENT_COLOR; @Override Loading Loading @@ -270,6 +271,7 @@ public class TaskListActivity extends BaseActivity implements TaskListFragment.C mTabs.setupWithViewPager(mViewPager); setupTabIcons(); mViewPager.addOnPageChangeListener(new OnPageChangeListener() { @Override Loading Loading @@ -328,7 +330,8 @@ public class TaskListActivity extends BaseActivity implements TaskListFragment.C }); } fetchAccentColor(this); ACCENT_COLOR=fetchAccentColor(this); mTabs.setBackgroundColor(ACCENT_COLOR); } Loading opentasks/src/main/java/org/dmfs/tasks/dashclock/TasksExtension.java +16 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.content.SharedPreferences; import android.database.Cursor; import android.preference.PreferenceManager; import android.text.format.Time; import android.util.Log; import com.google.android.apps.dashclock.api.DashClockExtension; import com.google.android.apps.dashclock.api.ExtensionData; Loading Loading @@ -277,6 +278,7 @@ public class TasksExtension extends DashClockExtension private boolean isDueEvent(Cursor c, boolean isAllDay) { Log.e("TAG", ".......isDueEvent"); if (c.isNull(c.getColumnIndex(Instances.DUE))) { return false; Loading @@ -291,6 +293,7 @@ public class TasksExtension extends DashClockExtension if (isAllDay) { Log.e("TAG", "...........1"); // get start of today in UTC Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 0); // clear would not reset the hour of day Loading Loading @@ -322,6 +325,7 @@ public class TasksExtension extends DashClockExtension private Cursor loadPinnedTaskCursor() { return getContentResolver().query(Instances.getContentUri(mAuthority), INSTANCE_PROJECTION, INSTANCE_PINNED_SELECTION, null, Tasks.PRIORITY + " is not null, " + Tasks.PRIORITY + " DESC"); } Loading @@ -329,6 +333,8 @@ public class TasksExtension extends DashClockExtension private Cursor loadRecentDueTaskCursor() { Log.e("TAG", ".......loadRecentDueTaskCursor"); Log.e("TAG", "...........2"); Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.HOUR_OF_DAY, RECENT_HOURS); // clear would not reset the hour of day long later = calendar.getTimeInMillis(); Loading @@ -340,6 +346,8 @@ public class TasksExtension extends DashClockExtension private Cursor loadRecentStartTaskCursor() { Log.e("TAG", ".......loadRecentStartTaskCursor"); Log.e("TAG", "...........3"); Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.HOUR_OF_DAY, RECENT_HOURS); // clear would not reset the hour of day long later = calendar.getTimeInMillis(); Loading @@ -351,6 +359,8 @@ public class TasksExtension extends DashClockExtension private Cursor loadRecentStartDueTaskCursor() { Log.e("TAG", ".......loadRecentStartDueTaskCursor"); Log.e("TAG", "...........4"); Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.HOUR_OF_DAY, RECENT_HOURS); // clear would not reset the hour of day long later = calendar.getTimeInMillis(); Loading @@ -363,6 +373,8 @@ public class TasksExtension extends DashClockExtension private Cursor loadAllDayTasksDueTodayCursor() { Log.e("TAG", ".......loadAllDayTasksDueTodayCursor"); Log.e("TAG", "...........5"); // get start of today in UTC Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 0); // clear would not reset the hour of day Loading @@ -379,6 +391,8 @@ public class TasksExtension extends DashClockExtension private Cursor loadAllDayTasksStartTodayCursor() { Log.e("TAG", ".......loadAllDayTasksStartTodayCursor"); Log.e("TAG", "...........6"); // get start of today in UTC Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 0); // clear would not reset the hour of day Loading @@ -395,6 +409,8 @@ public class TasksExtension extends DashClockExtension private Cursor loadAllDayTasksStartDueTodayCursor() { Log.e("TAG", ".......loadAllDayTasksStartDueTodayCursor"); Log.e("TAG", "...........7"); // get start of today in UTC Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 0); // clear would not reset the hour of day Loading opentasks/src/main/java/org/dmfs/tasks/groupings/ByDueDate.java +2 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.widget.TextView; import org.dmfs.jems.optional.elementary.NullSafe; import org.dmfs.jems.single.combined.Backed; import org.dmfs.tasks.R; import org.dmfs.tasks.TaskListActivity; import org.dmfs.tasks.contract.TaskContract.Instances; import org.dmfs.tasks.groupings.cursorloaders.TimeRangeCursorFactory; import org.dmfs.tasks.groupings.cursorloaders.TimeRangeCursorLoaderFactory; Loading Loading @@ -179,6 +180,7 @@ public class ByDueDate extends AbstractGroupingFactory if (title != null) { title.setText(getTitle(cursor, view.getContext())); title.setTextColor(TaskListActivity.ACCENT_COLOR); } // set list elements Loading Loading
opentasks/src/main/java/org/dmfs/tasks/EditTaskActivity.java +2 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ import android.os.Bundle; import androidx.fragment.app.Fragment; import androidx.core.app.NavUtils; import androidx.appcompat.app.ActionBar; import android.util.Log; import android.view.Menu; import android.view.MenuItem; Loading
opentasks/src/main/java/org/dmfs/tasks/QuickAddDialogFragment.java +6 −4 Original line number Diff line number Diff line Loading @@ -142,7 +142,7 @@ public class QuickAddDialogFragment extends SupportDialogFragment private View mConfirmation; private View mContent; private View mSaveButton; private TextView mSaveButton; private View mSaveAndNextButton; private TasksListCursorSpinnerAdapter mTaskListAdapter; Loading Loading @@ -221,7 +221,8 @@ public class QuickAddDialogFragment extends SupportDialogFragment } mColorBackground = view.findViewById(R.id.color_background); mColorBackground.setBackgroundColor(mLastColor); mColorBackground.setBackgroundColor(TaskListActivity.ACCENT_COLOR); mListSpinner = (Spinner) view.findViewById(R.id.task_list_spinner); mTaskListAdapter = new TasksListCursorSpinnerAdapter(getActivity(), R.layout.list_spinner_item_selected_quick_add, R.layout.list_spinner_item_dropdown); Loading @@ -237,7 +238,8 @@ public class QuickAddDialogFragment extends SupportDialogFragment mConfirmation = view.findViewById(R.id.created_confirmation); mContent = view.findViewById(R.id.content); mSaveButton = view.findViewById(android.R.id.button1); mSaveButton = (TextView)view.findViewById(android.R.id.button1); mSaveButton.setTextColor(TaskListActivity.ACCENT_COLOR); mSaveButton.setOnClickListener(this); mSaveAndNextButton = view.findViewById(android.R.id.button2); mSaveAndNextButton.setOnClickListener(this); Loading Loading @@ -326,7 +328,7 @@ public class QuickAddDialogFragment extends SupportDialogFragment { Cursor c = (Cursor) parent.getItemAtPosition(position); mLastColor = TaskFieldAdapters.LIST_COLOR.get(c); mColorBackground.setBackgroundColor(mLastColor); mColorBackground.setBackgroundColor(TaskListActivity.ACCENT_COLOR); mSelectedListId = id; } Loading
opentasks/src/main/java/org/dmfs/tasks/TaskListActivity.java +4 −1 Original line number Diff line number Diff line Loading @@ -187,6 +187,7 @@ public class TaskListActivity extends BaseActivity implements TaskListFragment.C private AppBarLayout mAppBarLayout; private FloatingActionButton mFloatingActionButton; public static int ACCENT_COLOR; @Override Loading Loading @@ -270,6 +271,7 @@ public class TaskListActivity extends BaseActivity implements TaskListFragment.C mTabs.setupWithViewPager(mViewPager); setupTabIcons(); mViewPager.addOnPageChangeListener(new OnPageChangeListener() { @Override Loading Loading @@ -328,7 +330,8 @@ public class TaskListActivity extends BaseActivity implements TaskListFragment.C }); } fetchAccentColor(this); ACCENT_COLOR=fetchAccentColor(this); mTabs.setBackgroundColor(ACCENT_COLOR); } Loading
opentasks/src/main/java/org/dmfs/tasks/dashclock/TasksExtension.java +16 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.content.SharedPreferences; import android.database.Cursor; import android.preference.PreferenceManager; import android.text.format.Time; import android.util.Log; import com.google.android.apps.dashclock.api.DashClockExtension; import com.google.android.apps.dashclock.api.ExtensionData; Loading Loading @@ -277,6 +278,7 @@ public class TasksExtension extends DashClockExtension private boolean isDueEvent(Cursor c, boolean isAllDay) { Log.e("TAG", ".......isDueEvent"); if (c.isNull(c.getColumnIndex(Instances.DUE))) { return false; Loading @@ -291,6 +293,7 @@ public class TasksExtension extends DashClockExtension if (isAllDay) { Log.e("TAG", "...........1"); // get start of today in UTC Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 0); // clear would not reset the hour of day Loading Loading @@ -322,6 +325,7 @@ public class TasksExtension extends DashClockExtension private Cursor loadPinnedTaskCursor() { return getContentResolver().query(Instances.getContentUri(mAuthority), INSTANCE_PROJECTION, INSTANCE_PINNED_SELECTION, null, Tasks.PRIORITY + " is not null, " + Tasks.PRIORITY + " DESC"); } Loading @@ -329,6 +333,8 @@ public class TasksExtension extends DashClockExtension private Cursor loadRecentDueTaskCursor() { Log.e("TAG", ".......loadRecentDueTaskCursor"); Log.e("TAG", "...........2"); Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.HOUR_OF_DAY, RECENT_HOURS); // clear would not reset the hour of day long later = calendar.getTimeInMillis(); Loading @@ -340,6 +346,8 @@ public class TasksExtension extends DashClockExtension private Cursor loadRecentStartTaskCursor() { Log.e("TAG", ".......loadRecentStartTaskCursor"); Log.e("TAG", "...........3"); Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.HOUR_OF_DAY, RECENT_HOURS); // clear would not reset the hour of day long later = calendar.getTimeInMillis(); Loading @@ -351,6 +359,8 @@ public class TasksExtension extends DashClockExtension private Cursor loadRecentStartDueTaskCursor() { Log.e("TAG", ".......loadRecentStartDueTaskCursor"); Log.e("TAG", "...........4"); Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.HOUR_OF_DAY, RECENT_HOURS); // clear would not reset the hour of day long later = calendar.getTimeInMillis(); Loading @@ -363,6 +373,8 @@ public class TasksExtension extends DashClockExtension private Cursor loadAllDayTasksDueTodayCursor() { Log.e("TAG", ".......loadAllDayTasksDueTodayCursor"); Log.e("TAG", "...........5"); // get start of today in UTC Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 0); // clear would not reset the hour of day Loading @@ -379,6 +391,8 @@ public class TasksExtension extends DashClockExtension private Cursor loadAllDayTasksStartTodayCursor() { Log.e("TAG", ".......loadAllDayTasksStartTodayCursor"); Log.e("TAG", "...........6"); // get start of today in UTC Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 0); // clear would not reset the hour of day Loading @@ -395,6 +409,8 @@ public class TasksExtension extends DashClockExtension private Cursor loadAllDayTasksStartDueTodayCursor() { Log.e("TAG", ".......loadAllDayTasksStartDueTodayCursor"); Log.e("TAG", "...........7"); // get start of today in UTC Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 0); // clear would not reset the hour of day Loading
opentasks/src/main/java/org/dmfs/tasks/groupings/ByDueDate.java +2 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.widget.TextView; import org.dmfs.jems.optional.elementary.NullSafe; import org.dmfs.jems.single.combined.Backed; import org.dmfs.tasks.R; import org.dmfs.tasks.TaskListActivity; import org.dmfs.tasks.contract.TaskContract.Instances; import org.dmfs.tasks.groupings.cursorloaders.TimeRangeCursorFactory; import org.dmfs.tasks.groupings.cursorloaders.TimeRangeCursorLoaderFactory; Loading Loading @@ -179,6 +180,7 @@ public class ByDueDate extends AbstractGroupingFactory if (title != null) { title.setText(getTitle(cursor, view.getContext())); title.setTextColor(TaskListActivity.ACCENT_COLOR); } // set list elements Loading