Skip to content

fix(reviewer): replace AlphaAnimation with ViewPropertyanimator in AnswerFeedbackView#21383

Open
SajalDevX wants to merge 1 commit into
ankidroid:mainfrom
SajalDevX:fix/feedback-backdrop-filter-smudge-21380
Open

fix(reviewer): replace AlphaAnimation with ViewPropertyanimator in AnswerFeedbackView#21383
SajalDevX wants to merge 1 commit into
ankidroid:mainfrom
SajalDevX:fix/feedback-backdrop-filter-smudge-21380

Conversation

@SajalDevX

Copy link
Copy Markdown
Contributor

Purpose / Description

Fixes a dark smudge/visual artifact at the top edge of card content when flipping cards in the new study screen .
The artifact appears when all the following conditions are met:

  • Dark mode (night theme) enabled
  • "Show answer feedback" enabled (Settings > Study Screen)
  • Frame style set to "Box" (Settings > Study Screen > Frame style)
  • Cards use custom CSS with "backdrop-filter" / translucent background

Fixes

Approach

  • AlphaAnimation puts the view on a software layer, but the WebView's backdrop-filter uses a hardware backdrop root layer. Normally the card's elevation/rounded corners hide the seam, but Frame style "Box" turns both off (PreviewerHelpers.kt:setFrameStyle()), so it shows.
  • Switched to ViewPropertyAnimator hardware accelerated, composites correctly with the backdrop layer. Same timing/interpolators, no visual change otherwise.
  • Also removed the two now unused XML animation files.

How Has This Been Tested?

  • Unit tests have been run and verified
  • Manually tested the fix with the version before and after on 2 devices -> (VivoV27-15) (Pixel-8a-17-emulator)

Learning (optional, can help others)

  • "ViewPropertyAnimator" is hardware-accelerated and participates in the normal layer
  • "android.view.animation.Animation" forces a software layer on the view
  • WebView with "backdrop-filter" creates a hardware layer that captures what's behind it for the blur effect

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

…swerFeedbackView

AlphaAnimation was combining incorrectly with webView backdrop-filter
when the "Box" frame style drops card elevation/clipping, left a dark
smudge at the top edge during the answer feedback animation.
@welcome

welcome Bot commented Jul 19, 2026

Copy link
Copy Markdown

First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible.

@BrayanDSO

Copy link
Copy Markdown
Member

Have you been able to reproduce the original issue?

@SajalDevX

Copy link
Copy Markdown
Contributor Author

Have you been able to reproduce the original issue?

yes

@SajalDevX

SajalDevX commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

@BrayanDSO Check this out and please let me know if you need help in reproducing this issue.
https://github.com/user-attachments/assets/f95c0fe1-668c-4143-bca6-18be3dc35d70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dark smudge artifact at top of card content when flipping (New study screen, dark mode, "Show answer feedback" + Frame style "Box")

2 participants