Anki-Android
Anki-Android copied to clipboard
[Bug] Screen Highlights/Darkens with Bluetooth Keyboard or Controller (Regression)
In update 2.16.3, fix #14231 for issue #14142 was published, altering the behavior of a specific bug. While the highlight color changed from bright to dark, the root problem still persists. Reverting the Pull Request would not be beneficial, as it would not resolve the underlying issue.
Reproduction Steps
Option 1: Using a Bluetooth Keyboard
- Connect a Bluetooth keyboard.
- Go to the deck.
- Press space, then 4.
Option 2: Using an (Xbox) Bluetooth Controller
- Connect an (Xbox) Bluetooth controller.
- Assign a key to a joystick or trigger (seem to always trigger the problem).
- Go to the deck.
- Press one of the assigned keys.
Expected Result
The screen's brightness/contrast should not change.
Actual Result
Instead, the screen appears as though it has been selected or highlighted (dark). This state persists through the cards, and the only ways to fix it are to either exit to the deck overview or close the app altogether.
Normal:
Highlighted
I have no experience with Android, so I consulted GPT-4 about this issue. My insights may not be of much help, as I'm unfamiliar with the underlying setup, such as the use of WebView or the specific layout causing the problem. Additionally, I am not aware of any potential side effects that may arise from this:
WebView webView = findViewById(R.id.webView);
webView.setFocusable(false);
webView.setFocusableInTouchMode(false);
Or
<resources>
<style name="ThemeOverlay.DisableKeyboardHighlight" parent="">
<item name="android:focusable">false</item>
<item name="android:focusableInTouchMode">false</item>
</style>
</resources>
Debug info
Refer to the support page if you are unsure where to get the "debug info".
Research
Enter an [x] character to confirm the points below:
- [x] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid
- [x] I have checked the manual and the FAQ and could not find a solution to my issue
- [x] I have searched for similar existing issues here and on the user forum
- [x] (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)
Same behavior as #14142, but this is much less intrusive. The major problem is risk of regressions
I don't have a solution for this, but I'm commenting to follow the issue. I sporadically experience this screen hightlight when using a keyboard with other apps such as Fennec and NewPipe
Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
it has been almost a year since this issue was created, but it seems that none of 2.18 beta branches contain fix of this issue. and any patch note about 2.18 branches doesn't mention this issue. so i just wanted ask.. by any chance does 2.18 beta branches contain fix of this issue..?
It doesn't