* Fix grammar mistake on empty Special items page
When you have no special items the following message is displayed
You don't have any Special
This commit changes that to the following
You don't have any Special items.
Or the equivilant in the user's language
* Allow support of RTL languages for special items
Previously the "you do not have any special items" message on the
items screen would not be compatible with right to left languages.
This change will allow proper display of the message after translation.
* refactoring for better expressivity
- Without the apostrophe, Talkback pronounces it as "Todoss" which
sounds weird.
- With the apostrophe, it is pronounced as "Todoos", which sounds
normal.
* Include state in content description of positive/negative habit buttons
- Now instead of announcing just 'Positive' or 'Negative' when these
buttons are focused with Talkback on, it also announces their current
state (e.g. 'Positive On').
- Also, when the state is changed, it now sends an accessibility event
so the new state is announced immediately (as advised at
https://developer.android.com/guide/topics/ui/accessibility/custom-views#send-events).
* Make headings in Task Form be read out as headings by Talkback
* Include state in content description of task difficulty buttons
- Now instead of announcing just 'Trivial', 'Medium' etc when these
buttons are focused with Talkback on, it also announces their current
state (e.g. 'Medium, Selected' / 'Trivial, Not Selected').
- Also, when a difficulty button is clicked, it now sends an
accessibility event for the button corresponding to that difficulty
level, so the new state is announced immediately.
- Note that since buttons are recreated every time one is clicked,
we can't simply send the event from the button's OnClickListener.
Instead we have to record which button is selected and send the
event for that button once it has been recreated.
* Include state in content description of reset streak buttons
- Now instead of announcing just 'Daily', 'Weekly' etc when these
buttons are focused with Talkback on, it also announces their current
state (e.g. 'Daily, Selected' / 'Weekly, Not Selected').
- Also, when a reset streak button is clicked, it now sends an
accessibility event with the new content description, so the new state
is announced immediately.
- Note that since buttons are recreated every time one is clicked,
we can't simply send the event from the button's OnClickListener.
Instead we have to record which button is selected and send the
event for that button once it has been recreated.
* Add labelFor attributes for repeats_every_spinner/edittext
- This adds more context for the drop-down menu and the edit-text
content descriptions read out by Talkback when editing how often dailies
repeat. This is advised by the accessibility principle described at
https://developer.android.com/guide/topics/ui/accessibility/principles#content-pairs
- For example instead of reading out 'Drop-down menu, Weekly' it now
reads out 'Drop-down menu, Weekly, for Repeats'. And instead of reading
out '1, Edit box' it now reads out '1, Edit box for Weeks'.
* Improve content descriptions of weekday buttons on New Daily screen
- Now instead of 'Capital M', 'Capital T', etc. Talkback reads out
'Monday, Selected', 'Tuesday, Not selected', etc.
- It also reads out the new status whenever a day is selected or
deselected.
* Mini refactor: reduce duplication in configureMonthlyRepeatViews
* Improve content description of weekly repeats buttons
- Now the content descriptions of the weekly repeats buttons in the
New Daily screen include whether they are Selected / Not selected.
- Also an accessibility event is sent when they are toggled, so the
content description is read out again with the updated status.
* Improve content descriptions of ReminderItemFormView
- Previously, the '+' button was focusable, even though it didn't do
anything, and Talkback read out 'Unlabelled button', regardless of
whether it was a '+' button or a 'x' button.
- Now, we only make it focusable when it becomes a delete button, and
Talkback reads out 'Delete Reminder, Button for 6.16pm' (or whatever
the time of the reminder it relates to is - this is achieved by setting
the android:labelFor property on the reminder TextView).
* Improve content descriptions of ChecklistItemFormView
- Previously, the '+' button was focusable, even though it didn't do
anything, and Talkback read out 'Unlabelled button', regardless of
whether it was a '+' button or a 'x' button.
- Now, we only make it focusable when it becomes a delete button,
and Talkback reads out 'Delete Checklist Entry, Button for Checklist
Text' (or whatever the checklist text is - this is achieved by setting
the android:labelFor property on the checklist EditText).
* Rename unlock_level_short string to level_unabbreviated
* Refactor: extract methods for setting user level within avatar
* Set content description of 'Lvl ..' text view to 'Level ..'
* Set content description of value bar to null
* Add getTranslatedType in pet and mount classes
* fix translation method
* Create kotlin extension of animal class
* rewrite if else as kotlin when
* move animal extension to extensions folder
* write unit tests, add some dependencies in build.gradle