-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: multiline topbar title not centered [WPB-9608] #3239
fix: multiline topbar title not centered [WPB-9608] #3239
Conversation
…into fix/multiline-topbar-title-not-centered
Built wire-android-staging-release-pr-3239.apk is available for download |
Built wire-android-internal-compat-pr-3239.apk is available for download |
Quality Gate passedIssues Measures |
Built wire-android-staging-compat-pr-3239.apk is available for download |
Built wire-android-internal-compat-pr-3239.apk is available for download |
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
Top bar title is not centered when it has two lines of text.
Causes (Optional)
There's an ongoing issue about multiline text taking all width available instead of wrapping visible text.
https://issuetracker.google.com/issues/206039942
Solutions
This workaround is based on this: https://stackoverflow.com/a/69947555, but instead of using
SubcomposeLayout
, we just first measure the text, check the length of each line of text, choose the longest and set it as the width of theText
composable.Testing
How to Test
Open the screen where title takes more than one line of text, usually device details where device name is long enough to take two lines.
Attachments (Optional)
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.