Skip to content

Fix part of #5607: Prevent toolbar title truncation in AudioLanguageFragment at 200% font scaling#6110

Closed
anmoltrvd01 wants to merge 3 commits intooppia:developfrom
anmoltrvd01:fix-5607-toolbar-truncation
Closed

Fix part of #5607: Prevent toolbar title truncation in AudioLanguageFragment at 200% font scaling#6110
anmoltrvd01 wants to merge 3 commits intooppia:developfrom
anmoltrvd01:fix-5607-toolbar-truncation

Conversation

@anmoltrvd01
Copy link
Copy Markdown
Contributor

@anmoltrvd01 anmoltrvd01 commented Feb 21, 2026

Explanation

Fix part of #5607 (PR 11: Settings & Help)

This PR addresses a UI issue in AudioLanguageFragment where the toolbar title was truncated when the system font size was increased to 200% (Android 14+, non-linear font scaling).

Changes made:

  • Introduced a custom TextView inside the Toolbar layout.
  • Enabled marquee scrolling for the toolbar title to ensure the full text remains accessible..
  • Configured the title to be focusable and selected programmatically to trigger marquee behavior.
  • Ensured compatibility with large font sizes and display scaling settings.

Testing performed:

  • Enabled 200% font scaling on an Android 14 emulator.
  • Tested with maximum Display Size setting.
  • Verified that the full toolbar title is visible without truncation.
  • Tested in both portrait and landscape modes to ensure there is no overlap, clipping, or layout breakage.

Screenshots (before/after) are attached below:

Before

After

PreferredAudioLang.mp4

(Enabled 200% font scaling & Tested with maximum Display Size setting.)

@anmoltrvd01 anmoltrvd01 requested a review from a team as a code owner February 21, 2026 20:33
@anmoltrvd01
Copy link
Copy Markdown
Contributor Author

Hi @adhiamboperes,
It looks like the workflows are awaiting maintainer approval since I’m a first-time contributor.
Could you please help approve and re-run them when you get a chance?
Thank you!

@adhiamboperes
Copy link
Copy Markdown
Contributor

Hi @anmoltrvd01, We typically don't make the toolbar text wrap, but we have an option called marquee, you can see an example of thei in TopicActivity and ExplorationActivity, please take a look at those and let me know if you have any questions.

Copy link
Copy Markdown
Contributor

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @anmoltrvd01! please make the changes I have suggested, and I will run your CI checks. I know that because the current changes are only xml related, the checks would pass.

@anmoltrvd01 anmoltrvd01 requested a review from a team as a code owner February 24, 2026 13:06
@anmoltrvd01 anmoltrvd01 force-pushed the fix-5607-toolbar-truncation branch from e3581ce to 700dd15 Compare February 24, 2026 13:47
@anmoltrvd01 anmoltrvd01 force-pushed the fix-5607-toolbar-truncation branch 3 times, most recently from 6ba11cd to a1d9c28 Compare February 24, 2026 15:46
@anmoltrvd01 anmoltrvd01 force-pushed the fix-5607-toolbar-truncation branch from a1d9c28 to f9bb109 Compare February 24, 2026 15:52
@oppiabot
Copy link
Copy Markdown

oppiabot bot commented Mar 3, 2026

Hi @anmoltrvd01, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Mar 3, 2026
@anmoltrvd01
Copy link
Copy Markdown
Contributor Author

Hi @adhiamboperes,
Thank you for your earlier feedback. I’ve addressed the requested changes (marquee implementation, formatting, and added the newline at end of file).
Could you please take another look and re-run the CI checks when you get a chance?
Thanks!

@oppiabot oppiabot bot removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Mar 4, 2026
@adhiamboperes adhiamboperes added the PR: don't merge - Contains Problems The PR has unresolved issues label Mar 4, 2026
Copy link
Copy Markdown
Contributor

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @anmoltrvd01! This solution is now in the correct direction. Could you please do the same to the rest of teh activities under "PR 11: Settings & Help" so that we can mark the checkbox as completed when your PR is merged?

However, please note that because this PR was force-pushed, you need to create a duplicate PR and copy both your changes and the nicely written PR description(including the before/after evidence).

In the wiki, force-pushing is prohibited because it changes the revision history. Only use merge and not rebase, and if you change something in your code, just create a new commit since you cannot ammend any that has been pushed already.

@anmoltrvd01
Copy link
Copy Markdown
Contributor Author

Hi @adhiamboperes,
Thank you for the guidance. As suggested, I created a new PR without force-push history and copied the updated changes and PR description (including the testing evidence and recordings).

New PR: #6135

This new PR includes the marquee implementation and verification for all fragments under PR 11: Settings & Help with 200% font scaling. Please let me know if any further changes are needed.
Thank you!

@anmoltrvd01 anmoltrvd01 closed this Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: don't merge - Contains Problems The PR has unresolved issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants