-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: Customizable keyboard/gamepad shortcut preferences #9460
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ba33939
to
1feabb1
Compare
took a conflict but I'm about to roll through the commits right now
Oh that sounds like fun |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks great - my solitary comment was about what looks like a duplicated build.gradle dep, and there is/was a conflict so needs a rebase
1feabb1
to
df35e6c
Compare
This needs some CI testing as well before a merge - tests may be flaky. EDIT: Bad de-conflict |
This was broken when we moved to onKeyDown, but the test was faulty so did not pick up on this. Test will be fixed in a commit in this PR History: Moved to onKeyDown in e439280 PR 8507
Use constraintlayout and have width == height rather than using onMeasure. OnMeasure didn't work perfectly as there was an AT_MOST constraint enforced by the dialog box wrapper
This allows a command to have a "default" value which isn't associated with the preference string, allowing easier upgrades to the data
COMMAND_ANSWER_FIRST_BUTTON COMMAND_ANSWER_SECOND_BUTTON COMMAND_ANSWER_THIRD_BUTTON COMMAND_ANSWER_FOURTH_BUTTON COMMAND_ANSWER_RECOMMENDED We already have "flip and answer". Now we differentiate between question & answer, these are not necessary
9d5cce0
to
c7f032b
Compare
Allows extension to other screens without a schema change
Allows detection of requirement to upgrade on a per preference basis
c7f032b
to
ea9c689
Compare
Writing a preference should be threadsafe (unless from a different process). Unsure what's going on here, but needs looking into EDIT: Hoping this is a Mockito spy issue. Spy has been removed. |
We remove the `VOLUME_UP` and `VOLUME_DOWN` gestures, and all associated code This removes the preferences: "gestureVolumeUp" "gestureVolumeDown" Instead, this is passed to a binding, for example: "binding_EDIT": [keycode 24] Related: 6502
So it's no longer listed in the preference list
This is visible on all supported APIs (API 21+)
ea9c689
to
7dcfc6d
Compare
I'm doing a few close/reopens to ensure that unit tests aren't flaky |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A series of green: https://github.com/ankidroid/Anki-Android/actions?query=branch%3A6052-new-prefs
build.gradle no longer has a duped dep, all looks good
Pull Request template
Purpose / Description
People disagree on the keyboard shortcuts to use, let them customise them
Fixes
Fixes #6052
Approach
How Has This Been Tested?
My Android 11 for a few weeks with a game controller, tested on API 21 and 23 briefly (screenshots from API 23)
Learning
Checklist
if
statements)