-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTODO
473 lines (377 loc) · 22.7 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
Backlog of tasks left to do:
* implement functionality to exit the app
* add functionality to display that user has to enter text before adding a workout
* use official Android icon set for ActionBar items (for example to add a new exercise)
* add 'About' screen with contact and version information
* use ContentResolver to save currently edited fields
* add popup after logging an exercise: "good work boy / girl" and variations on it (use first name)
* consider grouping exercises. Have the user select what it is good for (legs, arms, shoulders, cardio, core, etc.) and make it possible to select more than one
* fix runtime errors that show up in Log
* add separate section with deleted exercises, so that their information is not lost after they are first removed
* show deleted always at the bottom as a folder with exercises
* consider ways to prevent corruption to the stored exercises
* use atomic operation to write it (non-interruptible method?)
* maybe write temp file first and then overwrite existing one
* store a couple of previous versions and offer to load a previous one if loading a new one fails
* make sure that a new release never breaks older versions (add requirement and test for it)
* consider checking return values when adding new exercises, because it may break at some point
* work on tests in general
* add swiping in ViewExerciseActivity to swipe to previous or next exercise, see https://developer.android.com/design/patterns/navigation.html
* consider implementing the layout for multiple sizes
* https://developer.android.com/training/design-navigation/multiple-sizes.html
* show current date and a cog wheel next to it to change it
* investigate whether returning partial Exercise lists is better than returning an empty one in JsonUtils.java
* possible performance / memory footprint improvement:
only load exercise names first, and actual session data only when an exercise is opened
* save the separate exercises in different files as well
* add onboarding process where user sets their name and gender
* use SortedList for Sessions rather than sorting them by hand
* consider not sorting the sessions at startup or at least check best case performance for adding to already sorted lists
* create release branch with apk in it
* build apk with obfuscation
* show last 10 commits on webpage
* consider loading and saving the exercises in the background (json utils in a separate thread or service?)
* more info on AsyncTask https://youtu.be/jtlRNNhane0
* for a start consider just the write process as separate thread
* find proper cog wheel button for changing the date or use 'change' as text but make it blue and underscored like a link
* license the app before putting it on the app store
* https://developer.android.com/google/play/licensing/index.html
* add option to import and export exercises
* maybe provide example pre-populated set on website
* consider adding a test mode where exercises are prepopulated on the app
* set up post-push hook to update latest commits on static website
* implement account switcher functionality
* have a demo account pre-filled with common exercises
* make it possible to remove sessions
* make it possible to rename / edit exercises and sessions
* add a replace method in addition to add and remove
* figure out how to call onActivityResult in Main activity from activity
started in RecyclerView
* or, figure out how to get onActionItemClicked into Main activity
(we may have to implement the whole ActionMode.Callback interface,
or create a new interface that only calls what we want)
* check why adding new Exercise with keyboard visible has glitchy scroll animation
* have cancel and confirm buttons for adding exercises and sessions, similar
to alert dialog when deleting an exercise
* implement next and done for NumberPickers when adding a session
(see Android alarm clock as a reference)
* investigate why going from entering text in one numberpicker to entering
text in the next one does not work
* implement functionality to add comments to Sessions (for example 'hard!' or 'easy!')
* reduce size of the exercise cards so that more fit on the screen
* check whether date field in session view is wide enough as it breaks the line
on the emulator
* add Description field for exercises
* show it above the list of Sessions
* enter it when adding an exercise
* check whether json even supports strings across multiple lines as values
* for NewExerciseActivity, rather than having "Done" in the keyboard to close
the keyboard, add the Exercise straight from there
* consider extending Util.timeSince to show number of weeks, months and years as well
* for example '1 week ago (7 days), more than 1 week ago (x days), more than 1 month ago (x days)'
* find a better way of highlighting the selected exercise (for example showing it in blue)
* add support for time based exercises
* store time and distance in json
* select from the two when adding a new exercise
* two options, have an i button next to it which pops up a small explanation
on what the two options mean, for example
weight-based: Exercises measured in weight and repetitions, for example
sit-ups, lifts, lunges
time-based: Exercises measured in time and distance, for example running,
cycling or swimming
* when selecting an exercise load the respective title as for the exercise type
* consider dynamically loading the exercise or having two separate exercise
classes with separate layouts (probably the latter as it offers more flexibility)
* when adding a session have the same for weight, but have two selectors for
time-based exercises: time hh:mm:ss and distance xx.xx
* for json just store whether it is a time-based or weight-based exercise
* depending on which one load/store weight and repitions or time and distance
* split NewSessionActivity into 3 classes for generic, weight- and time-based
* find good way of loading the generic date for the datepicker through the generic
NewExerciseSessionActivity
* check if it is possible to include a separate layout file and load it separately.
This way the datepicker part could be loaded by the parent class and the rest
below it through the more specialised inheriting classes.
* bold entries where the weight has changed for weight-based Sessions
* add search functionality to search for exercises (see tripview for an example)
* https://developer.android.com/guide/topics/search/search-dialog.html
* https://developer.android.com/training/search/index.html
* https://developer.android.com/training/search/setup.html
* https://developer.android.com/training/search/search.html
* implement widget for off-screen to add Sessions
* consider grouping Sessions through a wrapper
* rather than having a separate card for each Session, only have one card per day
* the list of Sessions would look much less busy that way and probably allowed
to show more information as well (for example if it always allowed space for
3 sets, and expanded when it needed to show more)
* consider drawing a bitmap behind each Sessions
* this way we can avoid using a wrapper and just have a continous bitmap
if a Session has a following one on the same day, or an ending one if it
is the last for that day, and we can avoid the whole list inside a list thing
* consider not using card view at all for Sessions and instead a custom layout
* implement functionality to select the directory in which exercises are saved
* that way we can select the dropbox folder to sync the stored exercises
* work out the correct minSdkVersion etc., this may resolve the startup errors
that show up as well
* https://developer.android.com/guide/topics/manifest/uses-sdk-element.html
* rather than sorting sessions by time, sort them on the same day by a counter
* otherwise, if a Session is added the next day at an earlier time it will
be added before the other ones
* consider allowing reading of Exercises even when writing is not allowed
* consider using internal memory as fallback for when external is not available
* always write to both memories
* fall back to internal if reading from external fails
* for Sessions, set layout margin to 0 if it is on the same day as the previous
Session
* user switcher with option to add a new account
* example account
* raise card when it is selected via long press
* http://www.google.com/design/spec/what-is-material/elevation-shadows.html#elevation-shadows-shadows
* use proper material design icons for adding and deleting Exercises
* use stylised logo for weight and time exercises as background for
the respective exercise cards in the main activity
* consider releasing the app for free with built-in payments
* have it free to use and every ten times, show a popup asking to pay
* textra has it built-in, so that it opens the payment dialog directly
* about as easy as it gets
* https://developer.android.com/training/in-app-billing/preparing-iab-app.html#SetPermission
* have a good thank you dialog for whoever pays
* consider counting the number of hours worked on the project and show it
in the dialog, something like "the sole developer of gymcoachbob has
spent 9701 hours on the app so far"
* set up crossfading between empty and filled exercise view
* https://developer.android.com/training/animation/crossfade.html
* consider using cardview for the textview background
* figure out a better way to space the New{Exercise, Session}
* add a 'help' option to show the welcome screen again
* use TimePicker with seconds for time based exercises
* https://github.com/IvanKovac/TimePickerWithSeconds
* write Exercises in an order so that the name shows first rather than last in
the json file
* http://stackoverflow.com/questions/6993645/ordered-jsonobject
* figure out why last weight decimal is one less sometimes than the actual last write
* consider removing the shadow under the actual weights in the app logo
* consider writing a Python exercises parser
* play with ideas about showing information about the exercises without
actually having to implement it in the app
* put it on github as open source addition to the app (after app lands on Google Play)
* write Python generator to create json exercise file
* create 5,000 or 10,000 sessions and check how the app performs
* check whether inheriting classes need to implement the Serializable interface
if the super class already does so
* consider showing statistics somewhere (for example in a separate Activity)
* number of total sessions, total active days, average sessions per week etc.
* test the app on different screen sizes
* https://developer.android.com/guide/practices/screens_support.html#screen-independence
* find out why on rotated view the keyboard does not enter any numbers
* maybe because we are looking for a keyboard and not finding it in our
helper method?
* use DialogFragment for the exercise removal dialog as it is robust against
configuration changes
* see DatePickerFragment for an example on where we did the same already
* http://stackoverflow.com/questions/7557265/prevent-dialog-dismissal-on-screen-rotation-in-android/15729764#15729764
* mark selected exercise again when screen is rotated
* alternatively, implement a notification that is always visible and brings
the app into the foreground when it it is selected (lock screen widgets are
not supported anymore in later Androids and hence a waste of time to implement
in the current app as a new feature)
* https://developer.android.com/guide/topics/ui/notifiers/notifications.html
* a permanent notification may be the most Androidy way of doing it (Google Maps
for example works that way)
* store and restore current position for individual exercises (so that going
out of an exercise and back to it restores the currently visible session)
* add more exercise types
- weight: just date and weight
- show weight difference since last entry
- will allow to graph it as well
- running: time, pace, distance, average heartrate, min/max heartrate
- simple time based exercise, planks for example
* restore the previous selected time when adding a time-based Session
* import and use a proper timepicker for the Session duration
* add timeline activity with all sessions logged
* add extra pickers for time of a session in addition to the date
* default to the weight and number of repetitions of the first session of the
previous day rather than of the last session, as these are more likely applicable.
The next session on the same day simply repeats the values of the previous
session.
- add it as a member in the ExerciseSession class and set it up when the
sessions are loaded from file.
- Update it when new sessions are added
* use session numbers rather than the date to sort them
- this will then allow us to change the ordering as well
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
DONE:
* consider notifying the Adapter that a new exercise is added
* alternatively, find out why the view already updates as it is
* possibly because we draw the main activity again when we return from the 'new exercise' activity
* use DatePicker and NumberPicker to select weight and repetitions when adding
a Session
https://developer.android.com/guide/topics/ui/controls/pickers.html
https://developer.android.com/reference/android/widget/NumberPicker.html
* add widget to add sessions to an exercise
* we probably want to use a Dialog for that
* https://developer.android.com/guide/topics/ui/dialogs.html
* https://www.google.com/design/spec/components/dialogs.html#dialogs-behavior
* https://www.google.com/design/spec/components/dialogs.html#dialogs-full-screen-dialogs
* probably good to use an Activity, and make it optional to be a dialog.
* this way it will be easier to extend it but still be flexible
* we do not quite know yet what input we need to provide for example
* if it is only little input, we can show it as a dialog, if not we can use full Activity
* consider making an Activity a dialog
* https://developer.android.com/guide/topics/ui/dialogs.html#DialogFragment
"Tip: If you want a custom dialog, you can instead display an Activity as a dialog instead of using the Dialog APIs."
* maybe card_layout and row_item are separate because of different types, try passing in the correct one similar to example
https://developer.android.com/training/material/lists-cards.html
* use Log function rather than System.out.println
* add license headers and license file
* write version number for logs to file
* https://developer.android.com/tools/publishing/versioning.html
* use proper margins for list of Sessions
* center the date text in new session activity
* make it possible to use half kilos
* http://stackoverflow.com/q/18794265
* make it possible to have decimal values for weights
* a) include decimal values in existing NumberPicker
* b) add a second NumberPicker to select the grams for the kilos
the benefit of this is avoiding a hacky solution for the values
still need to update the selection everywhere to support decimals
* sort sessions in descending order
* find good way of reloading list of exercises after one is added
* scroll to bottom when a new exercise is added
* scroll to top when a new session is added
* add confirmation dialog before deleting an exercise
* consider renaming repository and account to beartiger_bear
* disagree for now as it reads weirdly
* customise how date is shown:
* no date if sets are on the same day and the current Session is not the topmost visible
* day and month if a session is in the current year (not implemented as it does not look right)
* day, month and year if session is not in the current year
* fix issue where adding two new sessions to the top results in both of them
showing the full date (probably because the second one is not updated when
there is a new one)
* does not happen anymore now that new sessions on the same day are sorted
chronologically
* add confirmation dialog before deleting exercises
* add utility functions for Dates
* correctly set the date for the last added Session
* either the first Session added or the latest one added on the same day as
the first Session in the overall list
* show "Today" when current date is selected (and not just when the dialog is opened
for the first time)
* consider showing the number of days since the last time an exercise was done
* http://stackoverflow.com/a/13936264
* make sure the Exercise view is updated when a Session is added
* update the time since last Session when a new Session is added
* maybe mark the selected Exercise when it is opened and update it when the
we go back to the main overview
* mark in ExerciseWrapper the last Exercise that is accessed? Or would that be
overwritten before onResume when the adapter is used?
* show the time since last exercise session as well after the date (+xd)
* use public static String TAG in util for the log output tag
* this way we do not have to define it in every single class that uses logging
* avoid memory leaks by not keeping Activity Context references
* consider moving 'days since' logic into the Exercise class
* this is where it is determined through the Session
* ExerciseViewAdapter needs days since last Session
* SessionViewAdapter needs days between two Sessions
* we may be able to remove the lastSession method as it is only used to
determine the days since the last Session
* update the 'days since' infos when a new day occurred since the app was last
opened
* probably save the current date at startup and compare against it when
onResume is called
* move this into its own function to keep it clear that it belongs to the 'days
since' logic
* move the logic for the days since for the Sessions into its own methods,
so that it is clear where it is used and it is not magically strewn all
through the code base
* it probably makes sense to have a wrapper around Sessions so that we can
still call the usual 'get' and 'add' methods, but as well have methods
to determine whether a Session should have '+d' info for example
* consider taking half day differences into account for 'days since' view
* for example exercises added in the evening are not shown as a full day later
when looked at in the morning. Maybe normalise each date so that they are
at the same time? When we calculate the time since, set both in a calendar
to the same time?
* update second Session when a new one is added at the top
* probably safe to always update the next Session when a new one is added as
every time a Session is added in the middle (with a new one on a separate
day following after it), the 'days since' need to be updated
* investigate why deleting Exercises crashes the app
* store exercises on sd card
* use .json extension
* check that the date update on a new day actually works
* it may not work as we for example do not count a full day if only half a
day passed (should be fixed now but nevertheless check)
* check that writing to file works on API > 18, as in that case we are not
requesting the permission
* (it does not work)
* check why deleting an exercise shows the black background (it does not anymore)
* set MainActity margin top to 0
* set ViewErciseActivity top and bottom margins to 0
* set up uncrustify with git pre-commit hook
* do not concatenate the Strings for the setText calls in the code
* use proper date formatter when setting the date in onDateSet in new session activity
* add decimal dot between the two number pickers for weight selection in NewSessionActivity
* consider adding it to the numbers in the second numberpicker itself (eg. '.1, .2, .3 etc.')
* add markers inbetween session view: 1 week ago, 2 weeks ago, ..., 1 month ago, 2 months ago, ..., 1 year ago, ...
* get Photoshop trial version and update app logo
* Photoshop does not work on case-sensitive file systems, so using Inkscape instead
* check whether entering values through keyboard actually calls the NumberPicker
callback correctly
* when entering the number via keyboard is cancelled it leaves the value on
the number picker but does not call the callback that sets it to the given
value. Appears to be an Android bug as it happens on official apps as well
* show 'x days ago' in Session row and always show it in 2 rows
* also the days since inbetween Sessions
* consider showing the day (as in Mon/Tue/Wed/Thu/Fri/Sat/Sun)
* Example layout:
Mon 05/06/2016
4 days ago, +4d
Tue 07/06/2016
Today, +0d
Thu 25/06/2016
Yesterday, +1d
* ends up looking too busy the way it is currently so deciding against it
* center the weight and repetitions vertically now that there are two lines
* consider not having the +0d for today's Session anymore because it
actually says today in the line below
* consider having a bigger margin around the text now as the row item is quite
packed with text now
* consider hardcoding the height of the Date text field rather than always
returning two lines and tricking it like that
* show days since after picking a Date in the DatePicker
* retain state when changing configuration whilst adding new sessions
* add changelog for information on what changed between the releases
* tasks to be considered for completion of 1.0 release:
* check whether proguard obfuscates the code (done)
* per item spacing (optional)
* time based exercises (optional)
* welcome screens (done)
* updated logo (done)
* decimal point between weight pickers (done)
* update package name (done)
* (lock screen widget)
* bump version number in mainline
* use the date string format set on the current device (EU vs. AU vs. US)
* allowing the app world-wide
* make layout scrollable when screen is turned as new sessions can not be added
currently
* alternatively just move the add button the side
* set up gitlab page that simply redirects to the app store
* show ViewExerciseActivity and NewSessionActivity above the lock screen,
so that it can be easily resumed to when the phone is locked
* show the number of each logged session, so that it is obvious how many were
done already
* update Exercise.add to return both the position at which the Session was inserted
and the range of sessions that need to be updated (otherwise inserting a Session
in the middle of a day will not update the view of the remaining ones)
- see for example ViewExerciseActivity.onResult
* split ViewExerciseActivity into general and more specific subclasses
- avoids it getting too messy when we add more Exercise types
* update access modifiers as recommended by Android Studio in Exercise.java and
ExerciseSession.java for example
* implement Play auto-backup support
- see https://developer.android.com/guide/topics/data/autobackup.html
- https://developer.android.com/training/sharing/shareaction.html
alternatively just store it where it is now and import it from there as well