Fix #19323: Resolve deck description dialog shaking#20053
Closed
Ayush-Patel-56 wants to merge 1 commit into
Closed
Fix #19323: Resolve deck description dialog shaking#20053Ayush-Patel-56 wants to merge 1 commit into
Ayush-Patel-56 wants to merge 1 commit into
Conversation
david-allison
requested changes
Jan 9, 2026
Member
david-allison
left a comment
There was a problem hiding this comment.
Doesn't seem fixed. Please upload a video of testing results.
screen-20260109-151049.mp4
Changed TextInputEditText height to wrap_content to fix circular layout dependency.
41eb360 to
7783ba8
Compare
Contributor
Author
Thanks for the video, that was helpful. The previous attempt to just fix the dimensions within the I have now completely refactored the layout to use a Changes:
I've tested this and it results in a solid UI that doesn't shake when editing lines. screen-20260109-152329.2.1.mp4 |
Member
|
Closing as-per our AI policy. This feels LLM generated: https://github.com/ankidroid/Anki-Android/blob/main/AI_POLICY.md#new-contributors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose / Description
Fixes a visual glitch where the deck description dialog would shake or jitter when adding new lines. The issue was caused by a circular layout dependency between the
TextInputLayoutand its childTextInputEditText.Fixes
Approach
The
TextInputLayoutwas set towrap_content(calculating height based on children), while its childTextInputEditTextwas set tomatch_parent(calculating height based on parent). This created a conflict where the layout engine struggled to resolve the height during content updates (like adding newlines), causing the "shaking".I changed the
android:layout_heightof theTextInputEditTexttowrap_content. This breaks the circular dependency, allowing the text input to grow naturally with its content, which the parent container then correctly wraps.How Has This Been Tested?
manually tested on an Android Virtual Device (AVD):
Checklist