Commit Graph

437 Commits

Author SHA1 Message Date
Phillip Hsu
7cf67fd14c Create theme preference 2016-09-19 20:04:30 -07:00
Phillip Hsu
274b4d83e3 Create preference to open system date and time settings 2016-09-19 19:35:14 -07:00
Phillip Hsu
d2d1fd22fe Create timer auto silence preference. Change default values of alarm auto silence and snooze duration preferences. Remove world clock preferences. 2016-09-19 18:37:05 -07:00
Phillip Hsu
f16d3386a8 Fix bug where AlarmController not initialized when AlarmsCursorAdapter is created for the first time 2016-09-19 17:35:29 -07:00
Phillip Hsu
c3e676e7ba Test content intent for time's up notification 2016-09-19 02:42:10 -07:00
Phillip Hsu
2890b54523 Fix bug where snackbar anchor was not being initialized after rotation 2016-09-19 02:09:31 -07:00
Phillip Hsu
cae0748c49 Implement content intent for upcoming alarm notification 2016-09-19 01:56:26 -07:00
Phillip Hsu
8b73d87e3a Prevent stopping TimerRingtoneService for successive Timers within the auto silence threshold 2016-09-18 21:07:54 -07:00
Phillip Hsu
8f1a42ef53 When changes made via TimerVH, do not modify notification chronometer unless new Timer's end time is different from previous Timer 2016-09-18 17:48:17 -07:00
Phillip Hsu
07ff5d715b Add one minute to paused Timer via VH and update notification immediately 2016-09-18 17:17:01 -07:00
Phillip Hsu
fab84506fa Add one minute to chronometer in notification and update it immediately 2016-09-18 16:56:27 -07:00
Phillip Hsu
0163fd7b7e Fix bug where addOneMinute() was extending paused Timers whose end times have passed by more than a minute 2016-09-18 15:38:23 -07:00
Phillip Hsu
8022536ec8 Fix bug where pausing Timer from VH was not updating the notification action to 'resume' 2016-09-18 04:06:46 -07:00
Phillip Hsu
4aeadf2810 Implement multiple timer notifications, restore TimerNotificationService on process restart, release timer resources as they are cancelled 2016-09-18 02:53:27 -07:00
Phillip Hsu
11e64649e7 Restore getNoteTag() method 2016-09-17 20:57:19 -07:00
Phillip Hsu
ced47b7fbe Implement multiple threads and chronometers. Check that StopwatchNotificationService still works. 2016-09-17 20:13:51 -07:00
Phillip Hsu
6c1f10da8d Begin implementing multiple threads and chronometers 2016-09-17 17:05:02 -07:00
Phillip Hsu
de761e291a Override isForeground() to return false 2016-09-17 16:23:28 -07:00
Phillip Hsu
f88de024b8 Write isForeground() method 2016-09-17 16:20:10 -07:00
Phillip Hsu
3de8074511 Change content intent of timer notification to launch MainActivity and scroll to timers page 2016-09-17 03:41:39 -07:00
Phillip Hsu
398a875654 Change content intent of stopwatch notification to launch MainActivity and scroll to stopwatch page 2016-09-16 19:34:06 -07:00
Phillip Hsu
ce1c56e979 Replace getNoteTag() with getNoteId(). Replace some stray hardcoded IDs with getNoteId() 2016-09-16 18:28:08 -07:00
Phillip Hsu
e586c58c6b Tried stuff that didn't work 2016-09-16 17:55:16 -07:00
Phillip Hsu
ee689cbb3c Change ChronometerNotificationService to be a foreground service 2016-09-16 16:00:59 -07:00
Phillip Hsu
90bdbf2505 Restore current lap when StopwatchNotificationService is restarted. Change add lap icon fillColor to white. 2016-09-16 02:26:43 -07:00
Phillip Hsu
698892419b Remove mStartTime and mPauseTime instance variables and read those values from SharedPreferences. Fix bug where SeekBar became visible on rotation with a lap progress ratio of zero. Fix bug where mini FABs became invisible on rotation with the stopwatch started. 2016-09-16 00:27:29 -07:00
Phillip Hsu
c6c0ba69a3 Update all views when onSharedPreferenceChanged callback is fired, regardless of which key-value pair actually changed. Fix bug where lap's total timestamp did not account for pause durations. 2016-09-15 17:50:02 -07:00
Phillip Hsu
4d2f930fa4 Restart chronometer in notification when service recreated after process is killed 2016-09-15 13:36:45 -07:00
Phillip Hsu
facdf05602 Moved lap inserting and updating to StopwatchNotificationService 2016-09-14 22:12:13 -07:00
Phillip Hsu
ad7335c6d6 Implement ability to stop stopwatch in both app and notification 2016-09-14 00:00:33 -07:00
Phillip Hsu
8438060ac8 Show correct elapsed time when reopening app after leaving it and pausing stopwatch from notification 2016-09-13 20:17:14 -07:00
Phillip Hsu
7c381cf62f Show correct FAB icon when stopwatch is paused and returning to StopwatchFragment 2016-09-13 16:15:51 -07:00
Phillip Hsu
8f01874cbd Sync chronometers and start/pause icon state in stopwatch notification and StopwatchFragment when resuming and pausing the stopwatch 2016-09-13 04:18:06 -07:00
Phillip Hsu
0f16cebd7c Send intent with start/pause action from StopwatchFragment to StopwatchNotificationService 2016-09-12 20:17:24 -07:00
Phillip Hsu
9d0b00d5e7 Send intent with stop action from StopwatchFragment to StopwatchNotificationService to remove notification when stopwatch is stopped 2016-09-12 03:13:37 -07:00
Phillip Hsu
6a33d42583 Clear laps table when stopping stopwatch from notification 2016-09-12 02:04:03 -07:00
Phillip Hsu
47413edba3 Implement handling stop action in StopwatchNotificationService 2016-09-12 01:46:04 -07:00
Phillip Hsu
81e8e0b1ad Removed unnecessary classes. Implement handling start/pause action in StopwatchNotificationService. 2016-09-12 01:36:04 -07:00
Phillip Hsu
d6eeac1db1 Wrote potentially unnecessary stuff 2016-09-12 00:00:46 -07:00
Phillip Hsu
e157498147 Modify StopwatchNotificationService to extend ChronometerNotificationService 2016-09-11 12:37:33 -07:00
Phillip Hsu
31e0a71d9f Created ChronometerNotificationService and ChronometerNotificationThread. Modify TimerNotificationService to extend from ChronometerNotificationService. 2016-09-11 01:05:03 -07:00
Phillip Hsu
02fbee2f7b Added todo 2016-09-10 02:36:37 -07:00
Phillip Hsu
bf381a05f1 Update BaseChronometer and ChronometerDelegate with Chronometer source code in API 24 2016-09-10 02:17:21 -07:00
Phillip Hsu
cd18b33fcd Fix countdown text in timer notification 2016-09-09 21:12:02 -07:00
Phillip Hsu
a3ad4ea458 Replace CountdownDelegate with ChronometerDelegate. Create BaseChronometer as superclass of CountdownChronometer and ChronometerWithMillis. 2016-09-09 21:06:06 -07:00
Phillip Hsu
e3c78861c6 Fix multiple timer notifications from all clearing when first timer to launch cancels all of them. Prevent setting negative durations for ProgressBar animator. 2016-09-08 23:07:24 -07:00
Phillip Hsu
df19d6ec4b Implement ticking countdown text for timer notification 2016-09-08 19:32:32 -07:00
Phillip Hsu
f3aa9e8ed4 Create onTimeSet() API for subclasses of BaseTimePickerDialog instead of letting them access mCallback directly 2016-09-07 17:15:41 -07:00
Phillip Hsu
022153fec1 Reconsider ViewHolder item ID for tag making 2016-09-07 16:54:41 -07:00
Phillip Hsu
e1d858a06a Removed considerations of item ID and position from tag making method 2016-09-07 02:51:05 -07:00
Phillip Hsu
17ad81d55e Create DialogFragmentController to manage showing and restoring dialogs 2016-09-07 02:20:11 -07:00
Phillip Hsu
e0ddd0b702 Create AddLabelDialogController to manage showing and restoring AddLabelDialog 2016-09-06 19:50:05 -07:00
Phillip Hsu
51469fa282 Apply dark theme overlay to appbar 2016-09-06 18:43:23 -07:00
Phillip Hsu
1cc87a828e Set appbar elevation 2016-09-06 18:32:33 -07:00
Phillip Hsu
f3e01995a1 Fix layout of EditTimerActivity. Create landscape layout. 2016-09-06 18:08:02 -07:00
Phillip Hsu
5d5002a6d7 Add delete menu item for TimerViewHolder 2016-09-06 14:54:42 -07:00
Phillip Hsu
f9b09f29a1 Persist label change to Timer as it is made. Fixed bug where label wasn't binding correctly afterward because of wrong parameter ordering when creating Timer instance in TimerCursor. 2016-09-06 02:42:26 -07:00
Phillip Hsu
edf33240e6 Create empty view for RecyclerViewFragment 2016-09-05 23:31:01 -07:00
Phillip Hsu
34930fa2b3 Change timer notification icons 2016-09-05 19:17:54 -07:00
Phillip Hsu
2f202467bb Change alarm notification icons 2016-09-05 18:30:27 -07:00
Phillip Hsu
f4addce363 New icon for auto silenced text 2016-09-05 18:17:32 -07:00
Phillip Hsu
ed351ab859 Increase icon size for RingtoneActivity buttons 2016-09-05 17:32:43 -07:00
Phillip Hsu
d5a7d16c72 Change header content style of RingtoneActivity subclasses 2016-09-05 16:31:59 -07:00
Phillip Hsu
b27720b2df Use ?attr/colorPrimary for RingtoneActivity background and dark theme overlay on text 2016-09-05 16:21:52 -07:00
Phillip Hsu
d504f98734 Use DateFormatSymbols to get weekday labels for the device locale. Remove corresponding string resources. 2016-09-05 15:10:55 -07:00
Phillip Hsu
d15f3f85a4 Apply correct tint to dismiss button icon 2016-09-05 03:39:58 -07:00
Phillip Hsu
c7fd4ac93f Move looping ringtone code to its own class. Use looped playback for RingtonePickerDialog. 2016-09-05 02:59:51 -07:00
Phillip Hsu
c44eefc472 Create our own MediaPlayer to play ringtone instead of using the Ringtone API, so we can set looped playback 2016-09-05 02:26:02 -07:00
Phillip Hsu
0a42097dcf Always enable alarm on new time set 2016-09-05 00:50:47 -07:00
Phillip Hsu
16a853157b Fix occurrences of crashing by snoozing alarm from notification by parceling and unparceling Alarm in UpcomingAlarmReceiver instead of retrieving from database with long id 2016-09-05 00:22:58 -07:00
Phillip Hsu
d44caf5255 Reschedule alarm on every change so previous PendingIntent that launches RingtoneActivity is cancelled and updated 2016-09-04 23:11:18 -07:00
Phillip Hsu
ecf41785c3 Persist ringtone change as it is made. Restore ringtone selected callback on rotate. 2016-09-04 00:43:51 -07:00
Phillip Hsu
66cb180887 Implement RingtonePickerDialog 2016-09-03 23:41:06 -07:00
Phillip Hsu
1339ad6d00 Created BaseAlertDialogFragment and RingtonePickerDialog. Change AddLabelDialog to extend from BaseAlertDialogFragment. 2016-09-03 21:57:11 -07:00
Phillip Hsu
944482a767 Use AppCompatEditText to get tinting for pre-21 2016-09-03 20:31:34 -07:00
Phillip Hsu
41a36bbe70 Set ID on EditText so it automatically saves state on rotation 2016-09-03 20:26:58 -07:00
Phillip Hsu
dc8b244369 Collapse expanded ViewHolder when OK is clicked 2016-09-03 20:19:56 -07:00
Phillip Hsu
f13897cc8e Fix snackbar not showing when alarms are created on 21+ 2016-09-03 19:54:13 -07:00
Phillip Hsu
3bbee9a641 Persist time change as it is made 2016-09-03 18:45:30 -07:00
Phillip Hsu
f9c4d8ed20 Change OnCheckedChange to OnClick for vibrate checkbox 2016-09-03 18:14:46 -07:00
Phillip Hsu
95f2e90fa8 Change OnCheckedChange to OnClick for day toggles 2016-09-03 18:11:19 -07:00
Phillip Hsu
c0c7d521df Persist recurring day change as it is made 2016-09-03 17:57:19 -07:00
Phillip Hsu
554dd49f0a Persist vibrate change as it is made 2016-09-03 17:41:12 -07:00
Phillip Hsu
abc849c243 Persist label change as it is made. Keep AlarmVH expanded as content change occurs. 2016-09-03 17:36:35 -07:00
Phillip Hsu
8171a663bc Change signature of RecyclerViewFragment#onCreateAdapter() to not require Bundle param 2016-09-03 15:33:03 -07:00
Phillip Hsu
ca2da0ad66 Split RecyclerViewFragment#getAdapter() into getAdapter() and onCreateAdapter() 2016-09-03 03:15:22 -07:00
Phillip Hsu
b1ac2e60dd Initialize NumberGridTimePickerDialog with Alarm's previous hour and minute. Expand collapsed ViewHolder when time is clicked. 2016-09-02 21:27:48 -07:00
Phillip Hsu
446d7a5334 Restore expanded alarm ViewHolder on rotate 2016-09-02 20:46:09 -07:00
Phillip Hsu
adb40beed8 Open label dialog and time picker from ExpandedAlarmViewHolder 2016-09-02 19:27:41 -07:00
Phillip Hsu
5ec512d268 Save label changes 2016-09-02 17:25:31 -07:00
Phillip Hsu
8b9b4258e2 Show selected ringtone URI when opening ringtone picker 2016-09-02 00:25:11 -07:00
Phillip Hsu
c8ea8cf43a Change value of themedIconTint to be a color resource, instead of a ColorStateList resource which is not supported for the XML tint attribute of an ImageView below v21. 2016-09-01 20:55:29 -07:00
Phillip Hsu
d7b3fc6ee1 Fixed bug where a missed, non-recurring alarm that superseded a previous alarm was not disabled after exiting AlarmActivity. Fixed bug where successive alarms would cancel missed alarm notifications for previous alarms. 2016-09-01 19:39:34 -07:00
Phillip Hsu
7b81bb467f Play default ringtone if alarm has not set one 2016-09-01 16:30:03 -07:00
Phillip Hsu
732049b540 Apply themed icon tint to ringtone icon 2016-09-01 15:30:35 -07:00
Phillip Hsu
70ccc25bc6 Change textColorHint, dark theme palette 2016-09-01 14:16:00 -07:00
Phillip Hsu
7310d49430 Remove label hint 2016-09-01 13:48:10 -07:00
Phillip Hsu
bff06c66f9 Added comments about colors 2016-09-01 03:53:32 -07:00
Phillip Hsu
331f012190 Layout changes to expanded alarm item. Create ColorStateList for day toggles in code. 2016-09-01 03:28:32 -07:00
Phillip Hsu
52b2f7ed90 Use TextAppearance.AppCompat parent and change text size 2016-09-01 01:16:26 -07:00
Phillip Hsu
2218114adc Change alarm time text appearance 2016-09-01 01:09:41 -07:00
Phillip Hsu
ce9797e8fd Change timer countdown text color 2016-09-01 00:59:36 -07:00
Phillip Hsu
25b709e793 Moved stopwatch style to its own file 2016-09-01 00:55:59 -07:00
Phillip Hsu
61c4a8a3f7 Moved timer styles to their own file 2016-09-01 00:01:45 -07:00
Phillip Hsu
fcf2cacbbb Moved TimerViewHolder child view attributes to styles.xml 2016-08-31 23:54:34 -07:00
Phillip Hsu
2d6b21a3c9 New colors for dark theme palette. Toggle between start/pause icons for timer item. 2016-08-31 22:06:28 -07:00
Phillip Hsu
c21cbc1124 Themed icon colors for TimerViewHolder 2016-08-31 21:05:27 -07:00
Phillip Hsu
db3e60d4dc Thin font weight 2016-08-31 18:36:41 -07:00
Phillip Hsu
089121c86d Thin font weight 2016-08-31 17:38:09 -07:00
Phillip Hsu
3d043b0a77 Visual changes 2016-08-31 17:31:35 -07:00
Phillip Hsu
2daa1a196c Use theme overlay to get white chronometer text across both dark/light themes 2016-08-31 17:03:01 -07:00
Phillip Hsu
ca8be47550 Change background color of stopwatch chronometer to match theme's colorPrimary 2016-08-31 16:38:03 -07:00
Phillip Hsu
8a7e76e198 Comment about correcting divider color in bottom sheets 2016-08-31 16:29:01 -07:00
Phillip Hsu
04cf62f0d0 Correct list divider color according to theme 2016-08-31 15:44:35 -07:00
Phillip Hsu
c64cf04d22 Add dark app theme 2016-08-31 15:36:24 -07:00
Phillip Hsu
f5d9fb1a97 Change text color of time according to state of alarm 2016-08-31 03:49:20 -07:00
Phillip Hsu
0db0d7cf7a Apply alertDialogTheme in AppTheme to use accent color 2016-08-30 23:28:13 -07:00
Phillip Hsu
d0c8abe1f1 Use AddLabelDialog 2016-08-30 20:06:51 -07:00
Phillip Hsu
db7de897e0 Show keyboard on AddLabelDialog show 2016-08-30 19:57:59 -07:00
Phillip Hsu
1a9471d3c7 Change factory method signature 2016-08-30 18:50:17 -07:00
Phillip Hsu
d1f3fae2c3 Create AddLabelDialog and use in TimerViewHolder 2016-08-30 18:46:52 -07:00
Phillip Hsu
c2d86389b0 Increase label margin top 2016-08-30 17:42:46 -07:00
Phillip Hsu
e94a1fd3a5 Remove bottom padding from laps container in landscape 2016-08-30 17:32:18 -07:00
Phillip Hsu
e025f70965 Replace hardcoded dimens with dimen resources 2016-08-30 17:24:25 -07:00
Phillip Hsu
a7af4f84bb Give extra space at bottom of RecyclerView so the last item isn't covered by FAB 2016-08-30 17:02:37 -07:00
Phillip Hsu
d970505dd5 Revert to include fragment_recycler_view in Fragment layouts, programmatically set padding as needed. Replace hardcoded dimens with dimen resources. 2016-08-30 16:27:49 -07:00
Phillip Hsu
02fc6f2bdd Replace include of fragment_recycler_view with RecyclerView child due to different padding requirements 2016-08-30 02:54:32 -07:00
Phillip Hsu
43805076eb Fix timer item margin directions for portrait because RecyclerView has padding in those directions now 2016-08-30 02:44:46 -07:00
Phillip Hsu
2dc411f999 Create GridLayoutManager for TimersFragment in landscape 2016-08-30 02:39:18 -07:00
Phillip Hsu
be9aca1ede Create landscape layout for StopwatchFragment 2016-08-30 02:20:17 -07:00
Phillip Hsu
c0553b85b7 Restore Activity FAB's translationX on rotation 2016-08-29 22:37:49 -07:00
Phillip Hsu
925424c882 Restore mini FABs and Activity FAB correctly on rotate 2016-08-29 03:24:16 -07:00
Phillip Hsu
2daf03b754 Fixed SeekBar not animating after device rotation 2016-08-28 22:32:16 -07:00
Phillip Hsu
b03c6123e9 Changed ProgressBar to SeekBar 2016-08-28 17:18:52 -07:00
Phillip Hsu
85d78e566b Changed ProgressBar to SeekBar 2016-08-28 04:23:45 -07:00
Phillip Hsu
e48bb036ac Comment out testing code 2016-08-28 01:21:32 -07:00
Phillip Hsu
9b886dfe5b Restore correct order of primary and secondary texts 2016-08-27 03:15:00 -07:00
Phillip Hsu
fa3dcea9bf 24 hour selection indicator restored on rotate 2016-08-27 00:18:15 -07:00
Phillip Hsu
be66d43e4c Minute selection indicator restored on rotate 2016-08-26 23:27:45 -07:00
Phillip Hsu
ee77105a8e Selection indicator restored on rotate 2016-08-26 21:14:48 -07:00
Phillip Hsu
591bc6d680 Fixed FAB enabled color not restoring correctly 2016-08-26 03:35:57 -07:00
Phillip Hsu
07277163ae ampm instance state saved and restored 2016-08-26 03:12:05 -07:00
Phillip Hsu
5188b7e128 Fix 24 hour numpad not disabling FAB for invalid 3-digit times upon backspacing 2016-08-25 17:35:29 -07:00
Phillip Hsu
eaff0fcb5d Only update FAB state if last state is different from new state 2016-08-25 15:34:18 -07:00
Phillip Hsu
e99b964d9b Removed remnant of selectableItemBackgroundBorderless along edges when animating from hours index to minutes index 2016-08-25 15:05:49 -07:00
Phillip Hsu
fd57663b86 Tint selectableItemBackground with accent color for versions below 21 2016-08-24 22:24:49 -07:00
Phillip Hsu
f2e25cb261 Tint selectableItemBackground with accent color 2016-08-24 19:43:24 -07:00
Phillip Hsu
29086b4b02 Removed unused attribute 2016-08-24 03:35:37 -07:00
Phillip Hsu
841a54e3f5 Created landscape layout for numeric keypad picker 2016-08-24 03:34:59 -07:00
Phillip Hsu
2d4d661d7f 24 hour grid fit to landscape mode 2016-08-24 02:20:36 -07:00