ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.56k stars 2.21k forks source link

Flickering when pressing answer buttons #7165

Closed balta2ar closed 3 years ago

balta2ar commented 4 years ago

Hi! Another issue that I noticed after upgrading to 2.13 and 2.13.1 is that when I press "show answer" or again/good/... buttons, the whole card flickers. It definitely wasn't the case on the older versions. I tried to capture that on video: https://youtu.be/8_gTggEVD4Y

Frame rate is not perfect so it may be hard to notice but I think it's still visible at times.

Also, about the way the buttons have been adjusted. I understand you guys have best intentions and you are trying to make UI better and I feel really bad for coming here and voicing something that could be a question of taste and arguable, but the new highlight when a button is pressed is a bit too flashy.

S00919-231809(1)

The difference between pressed/released states is such that for me personally it becomes distracting from the card itself. I noticed the changes of the font as well -- and that is fine -- but the "pressed" background feels too bright compared to the way it was colored before. Again, I know that it's not uncommon for people to come and complain when UI changes, people hate that, but it's just some aspects of these chanes are more distracting than others. Thanks for understanding and sorry for my nagging and nitpicking.

david-allison commented 4 years ago

@balta2ar Could you export a card and upload it here (full card template & fields). I can't reproduce this yet on my phone and it could be a template-related issue (more likely if you're loading external CSS).

RE: Darkening the buttons, it's totally possible, what colors would work better for you?

balta2ar commented 4 years ago

Here is one of my decks with dark background (remove .zip extension, github didn't allow uploading here otherwise): english__english-for-students.apkg.zip Cards with dark background are the type of cards where the flickering is most visible and annoying in my setup.

I've just checked with the previous version 1.12 where the highlighting used to make buttons darker, not brighter. It worked perfectly for me and I never noticed it, and I was never distracted, so if you could bring that back, I'd be super happy :pray: :hugs: Sorry for asking you to basically revert your changes, it's so hard to please all the users at the same time :pensive: photo_2020-09-20_09-10-17 photo_2020-09-20_09-10-21

On a side note, I wonder how I would feel the UX if button highlight didn't change at all when I press and release a button. But I guess that idea ties back to the "disable animations" (or "safe display" toggle) issue and maybe will be addressed later in the future.

mikehardy commented 4 years ago

UI changes are basically impossible because of the "no one likes everything" thing you mention. In the future we'll offer a card template I'll name something like "2008 AnkiDroid" that uses the Javascript API so people can have the "oh thank god nothing change ever" experience, and we can change things ;-)

DIsable animations, I suggest. I did you try it?

balta2ar commented 4 years ago

Yep, "safe mode" has always been on in my settings. Highlighting of the buttons, however, is still active. I reckon #7134 is not part of 2.13.2 release? Or maybe it just disables ripple effect, but highlighting stays :man_shrugging:

david-allison commented 4 years ago

@balta2ar I'm looking into this now.

I'm getting flickering on 2.12.1. I'm not sure there's much that can be done if this is the case, it's the WebView taking time to load the custom fonts defined in the Card Template.

Could you download https://github.com/ankidroid/Anki-Android/releases/download/v2.12.1/AnkiDroid-2.12.1.parallel.A.apk and confirm that you don't get flickering?

You might need to look into our alphas between 2.12.1 and 2.13.0 and bisect to find the alpha where the problem was introduced.

https://github.com/ankidroid/Anki-Android/releases

mikehardy commented 4 years ago

that was in 2.13.1 (visible by milestone assigned to issue and/or PR) it was likely just ripple yes, highlight is a different aspect of material design, we appear to be following guidelines with a slight color lightening: https://material.io/design/interaction/states.html#usage

balta2ar commented 4 years ago

This is super weird but I still see flickering in 2.12.1 parallel A. Even worse: I kept installing older versions to bisect the problematic version back to 2.10.4 so far (all parallel A builds), and they all (I only tried non-alpha, each latest minor+patch) keep flickering on dark background :open_mouth:

The flickering couldn't be there in Google Play version before the update a couple of weeks ago, I swear, I would've noticed that 100%. Am I going mental and start seeing things? :confused: Can it be explained somehow? I rarely and selectively update programs and I don't have any automatic over the air updates (Meizu X8, Android 8.1). I haven't updated Chrome in a while, for example. I encountered issues with GoldenDict not working because of some Chrome updates, so I'm rather cautious about updates these days.

mikehardy commented 4 years ago

The cards are shown as little web pages. So performance and behavior depends to a large extend on the web renderer. In most operating systems this is a Chrome-based WebView implementation that is updated independently of AnkiDroid as an app update in the system app updater. So that could have changed but it sounds like you are careful about it ?

Perhaps the font itself is not fetched OTA and not in your collection?

The loading itself takes quite a bit of CPU I imagine, so perhaps something is causing your phone to work extra hard, unexpectedly, in the background? You would likely notice battery drain in this case but I'm just thinking out loud what could cause this to happen. Very large fonts do have this affect and have their own paragraph in the manual https://docs.ankidroid.org/manual.html#customFonts

david-allison commented 4 years ago

We are pre-rendering cards on a background thread now (which is a bit more work), but I'm more likely to chalk this down to an issue caused by a Android System WebView update.

Removing the custom font will stop it, but that's not a great solution. I don't know if there's anything that we can do about it 😕

balta2ar commented 4 years ago

Flickering has finally got to me and I ended up swapping this beautiful Google Noto font recommended in the official manual to the ugly default Arial :( Are there any android logs that I can check on my phone to confirm that some system component has been updated?

For the past several days I honestly tried to get used to the new flashing buttons but I just couldn't :( Every time I press "Show answer" it feels like I'm caught in the headlights, sooo distracting. If you could just revert to how it was, I'd very much appreciate it (or have a setting, but settings creep is difficult to maintain, I know).

Perhaps the font itself is not fetched OTA and not in your collection?

I configured the font according to the manual many years ago and it worked flawlessly ever since. I just checked, and both _NotoSans-Regular.ttf and _NotoSerif-Regular.ttf are in my collection.media folder.

mikehardy commented 4 years ago

@balta2ar did you try the safe display setting in preferences? it disables all animation including the material-design specified ripple on buttons

balta2ar commented 4 years ago

Yes, sir (https://github.com/ankidroid/Anki-Android/issues/7165#issuecomment-695809448) safe mode is on.

github-actions[bot] commented 3 years ago

Hello 👋, this issue has been opened for more than 2 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

balta2ar commented 3 years ago

still searching for solutions

github-actions[bot] commented 3 years ago

Hello 👋, this issue has been opened for more than 2 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

balta2ar commented 3 years ago

Still searching for solutions

On Fri, Jan 29, 2021, 21:50 github-actions[bot] notifications@github.com wrote:

Hello 👋, this issue has been opened for more than 2 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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ankidroid/Anki-Android/issues/7165#issuecomment-770042407, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACTFREXQBUPTKW3FCENZMDS4MNPXANCNFSM4RTHUTRQ .

mikehardy commented 3 years ago

I think this may be a duplicate actually #7369