Skip to content

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

Merged
adhiamboperes merged 9 commits intooppia:developfrom
anmoltrvd01:fix-5607-toolbar-truncation-v2
Apr 13, 2026
Merged

Fix part of #5607: Prevent toolbar title truncation in AudioLanguageFragment at 200% font scaling#6135
adhiamboperes merged 9 commits intooppia:developfrom
anmoltrvd01:fix-5607-toolbar-truncation-v2

Conversation

@anmoltrvd01
Copy link
Copy Markdown
Contributor

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+).

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.

Tested all fragments in PR 11: Settings & Help with font scaling set to 200% on an Android 14 emulator.

Results:

  • AppLanguageFragment – no truncation observed
  • AudioLanguageFragment – toolbar title was truncated → fixed using a marquee TextView
  • ReadingTextSizeFragment – no truncation observed
  • HelpFragment – no truncation observed
  • FAQListFragment – no truncation observed

Only AudioLanguageFragment required a fix.

Screenshots (before/after) are attached below:

Before: Toolbar title truncated at 200% font scaling.

After: Marquee effect scrolls the title instead of truncating (see attached recording).

PreferredAudioLang.mp4

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

Screen.Recording.2026-03-07.160639.mp4

The recording shows navigation through each screen confirming that only AudioLanguageFragment required a fix.

@oppiabot
Copy link
Copy Markdown

oppiabot bot commented Mar 14, 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! If you're unsure how to reassign this PR to a reviewer, please make sure to review the wiki page that details the Guidance on submitting PRs.

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

Hi @BenHenning, PTAL when you have time.
@adhiamboperes, thank you again for your earlier guidance. This is the follow-up PR created without force-push history implementing the marquee fix for AudioLanguageFragment and verifying all fragments under PR 11 with 200% font scaling.
Please let me know if any further changes are needed. Thank you!

@oppiabot oppiabot bot removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Mar 16, 2026
@BenHenning
Copy link
Copy Markdown
Member

Deferring to @adhiamboperes for review.

@BenHenning BenHenning removed their assignment Mar 17, 2026
@oppiabot
Copy link
Copy Markdown

oppiabot bot commented Mar 24, 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! If you're unsure how to reassign this PR to a reviewer, please make sure to review the wiki page that details the Guidance on submitting PRs.

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

Hi @adhiamboperes, it looks like the comment coverage workflow requires manual approval for first-time contributors, so the coverage checks are currently failing. Could you please approve and re-run the workflow when you have time?
Thank you!

@oppiabot oppiabot bot removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Mar 24, 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.

@anmoltrvd01, apologies for the delayed review.

I have left a suggestion for how to test the changes, otherwise good job so far.

@anmoltrvd01
Copy link
Copy Markdown
Contributor Author

Hi @adhiamboperes, I've addressed the requested changes by adding the test for toolbar marquee behavior in 'AudioLanguageActivityTest' and fixing the formatting issues.
Please let me know if anything else needs to be updated.
Thanks!

@adhiamboperes
Copy link
Copy Markdown
Contributor

@anmoltrvd01, the new test is failing. Please fix it and run it locally. We have included the test running instructions in the installation guide of the wiki.
IMG_2518

@oppiabot
Copy link
Copy Markdown

oppiabot bot commented Apr 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! If you're unsure how to reassign this PR to a reviewer, please make sure to review the wiki page that details the Guidance on submitting PRs.

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

Hi @adhiamboperes,
I've fixed the failing test and verified it locally, all tests are now passing. I've also attached a screenshot of the successful test run for reference.
Could you please approve and re-run the workflows so the checks can complete?
Thanks!
Screenshot 2026-04-07 165256

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, PTAL at some final cleanup comments.

Also:

  1. Don't resolve comments - the reviewer will resolve comments after verifying that they have been addressed fully.
  2. Always re-assign the PR to the reviewer when done making changes. If you're unsure how to reassign this PR to a reviewer, please make sure to review the wiki page that details the Guidance on submitting PRs.

@anmoltrvd01 anmoltrvd01 removed their assignment Apr 8, 2026
@anmoltrvd01
Copy link
Copy Markdown
Contributor Author

@adhiamboperes PTAL

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.

Looks good so far, thanks!

Waiting for CI to pass.

@oppiabot
Copy link
Copy Markdown

oppiabot bot commented Apr 8, 2026

Assigning @BenHenning for code owner reviews. Thanks!

@adhiamboperes adhiamboperes changed the title Fix #5607: Prevent toolbar title truncation in AudioLanguageFragment at 200% font scaling (v2) Fix #5607: Prevent toolbar title truncation in AudioLanguageFragment at 200% font scaling Apr 8, 2026
@anmoltrvd01
Copy link
Copy Markdown
Contributor Author

PTAL when you get a chance @adhiamboperes,

I’m a bit unsure about the current CI failures. It’s been a few days and I’m not completely clear on what is still blocking the PR from passing all checks.
From my side, tests seem to be passing, but the coverage workflow is still failing. Could you please guide me on what needs to be fixed next?
Thanks!

@oppiabot oppiabot bot assigned adhiamboperes and unassigned anmoltrvd01 Apr 13, 2026
@oppiabot
Copy link
Copy Markdown

oppiabot bot commented Apr 13, 2026

Unassigning @anmoltrvd01 since a re-review was requested. @anmoltrvd01, please make sure you have addressed all review comments. Thanks!

@github-actions
Copy link
Copy Markdown

Coverage Report

Results

Number of files assessed: 74
Overall Coverage: 84.82%
Coverage Analysis: PASS

Passing coverage

Files with passing code coverage
File Coverage Lines Hit Status Min Required
MathModel.ktutility/src/main/java/org/oppia/android/util/parser/math/MathModel.kt
100.00% 26 / 26 70%
MathTagHandler.ktutility/src/main/java/org/oppia/android/util/parser/html/MathTagHandler.kt
84.21% 96 / 114 70%
CustomHtmlContentHandler.ktutility/src/main/java/org/oppia/android/util/parser/html/CustomHtmlContentHandler.kt
85.71% 114 / 133 70%
CurrentUserProfileIdIntentDecorator.ktutility/src/main/java/org/oppia/android/util/profile/CurrentUserProfileIdIntentDecorator.kt
100.00% 12 / 12 70%
ProfileIdMigrationUtil.ktutility/src/main/java/org/oppia/android/util/profile/ProfileIdMigrationUtil.kt
100.00% 2 / 2 70%
EventBundleCreator.ktutility/src/main/java/org/oppia/android/util/logging/EventBundleCreator.kt
76.23% 340 / 446 70%
EventTypeToHumanReadableNameConverter.ktutility/src/main/java/org/oppia/android/util/logging/EventTypeToHumanReadableNameConverter.kt
100.00% 57 / 57 70%
EditTextInputAction.kttesting/src/main/java/org/oppia/android/testing/espresso/EditTextInputAction.kt
82.35% 14 / 17 70%
EventLogSubject.kttesting/src/main/java/org/oppia/android/testing/logging/EventLogSubject.kt
97.66% 501 / 513 70%
ComputeAabDifferences.ktscripts/src/java/org/oppia/android/scripts/apkstats/ComputeAabDifferences.kt
89.46% 314 / 351 6% *
UrlImageParser.ktutility/src/main/java/org/oppia/android/util/parser/image/UrlImageParser.kt
57.28% 122 / 213 57% *

* represents tests with custom overridden pass/fail coverage thresholds

Exempted coverage

Files exempted from coverage
File Exemption Reason
LearnerAnalyticsLogger.ktdomain/src/main/java/org/oppia/android/domain/oppialogger/analytics/LearnerAnalyticsLogger.kt
This file is incompatible with code coverage tooling; skipping coverage check.
AudioPlayerController.ktdomain/src/main/java/org/oppia/android/domain/audio/AudioPlayerController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
TopicController.ktdomain/src/main/java/org/oppia/android/domain/topic/TopicController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
StateRetriever.ktdomain/src/main/java/org/oppia/android/domain/util/StateRetriever.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ExplorationProgressController.ktdomain/src/main/java/org/oppia/android/domain/exploration/ExplorationProgressController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ExplorationDataController.ktdomain/src/main/java/org/oppia/android/domain/exploration/ExplorationDataController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
MathBitmapModelLoader.ktutility/src/main/java/org/oppia/android/util/parser/math/MathBitmapModelLoader.kt
This file is exempted from having a test file; skipping coverage check.
ImageLoader.ktutility/src/main/java/org/oppia/android/util/parser/image/ImageLoader.kt
This file is exempted from having a test file; skipping coverage check.
TestGlideImageLoader.ktutility/src/main/java/org/oppia/android/util/parser/image/TestGlideImageLoader.kt
This file is exempted from having a test file; skipping coverage check.
GlideImageLoader.ktutility/src/main/java/org/oppia/android/util/parser/image/GlideImageLoader.kt
This file is exempted from having a test file; skipping coverage check.
HtmlParser.ktutility/src/main/java/org/oppia/android/util/parser/html/HtmlParser.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ViewBindingShimImpl.ktapp/src/main/java/org/oppia/android/app/shim/ViewBindingShimImpl.kt
This file is exempted from having a test file; skipping coverage check.
ViewBindingShim.ktapp/src/main/java/org/oppia/android/app/shim/ViewBindingShim.kt
This file is exempted from having a test file; skipping coverage check.
MathExpressionInteractionsView.ktapp/src/main/java/org/oppia/android/app/customview/interaction/MathExpressionInteractionsView.kt
This file is incompatible with code coverage tooling; skipping coverage check.
PromotedStoryCardView.ktapp/src/main/java/org/oppia/android/app/customview/PromotedStoryCardView.kt
This file is exempted from having a test file; skipping coverage check.
StoryFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/story/StoryFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
AudioFragment.ktapp/src/main/java/org/oppia/android/app/player/audio/AudioFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
AudioViewModel.ktapp/src/main/java/org/oppia/android/app/player/audio/AudioViewModel.kt
This file is exempted from having a test file; skipping coverage check.
StateFragment.ktapp/src/main/java/org/oppia/android/app/player/state/StateFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
SelectionInteractionViewModel.ktapp/src/main/java/org/oppia/android/app/player/state/itemviewmodel/SelectionInteractionViewModel.kt
This file is exempted from having a test file; skipping coverage check.
ContinueInteractionViewModel.ktapp/src/main/java/org/oppia/android/app/player/state/itemviewmodel/ContinueInteractionViewModel.kt
This file is exempted from having a test file; skipping coverage check.
StateItemViewModel.ktapp/src/main/java/org/oppia/android/app/player/state/itemviewmodel/StateItemViewModel.kt
This file is exempted from having a test file; skipping coverage check.
NumericInputViewModel.ktapp/src/main/java/org/oppia/android/app/player/state/itemviewmodel/NumericInputViewModel.kt
This file is exempted from having a test file; skipping coverage check.
DragAndDropSortInteractionViewModel.ktapp/src/main/java/org/oppia/android/app/player/state/itemviewmodel/DragAndDropSortInteractionViewModel.kt
This file is exempted from having a test file; skipping coverage check.
ImageRegionSelectionInteractionViewModel.ktapp/src/main/java/org/oppia/android/app/player/state/itemviewmodel/ImageRegionSelectionInteractionViewModel.kt
This file is exempted from having a test file; skipping coverage check.
TextInputViewModel.ktapp/src/main/java/org/oppia/android/app/player/state/itemviewmodel/TextInputViewModel.kt
This file is exempted from having a test file; skipping coverage check.
MathExpressionInteractionsViewModel.ktapp/src/main/java/org/oppia/android/app/player/state/itemviewmodel/MathExpressionInteractionsViewModel.kt
This file is exempted from having a test file; skipping coverage check.
RatioExpressionInputInteractionViewModel.ktapp/src/main/java/org/oppia/android/app/player/state/itemviewmodel/RatioExpressionInputInteractionViewModel.kt
This file is exempted from having a test file; skipping coverage check.
FractionInteractionViewModel.ktapp/src/main/java/org/oppia/android/app/player/state/itemviewmodel/FractionInteractionViewModel.kt
This file is exempted from having a test file; skipping coverage check.
DragDropSortInteractionView.ktapp/src/main/java/org/oppia/android/app/player/state/DragDropSortInteractionView.kt
This file is exempted from having a test file; skipping coverage check.
SelectionInteractionView.ktapp/src/main/java/org/oppia/android/app/player/state/SelectionInteractionView.kt
This file is exempted from having a test file; skipping coverage check.
StatePlayerRecyclerViewAssembler.ktapp/src/main/java/org/oppia/android/app/player/state/StatePlayerRecyclerViewAssembler.kt
This file is exempted from having a test file; skipping coverage check.
ExplorationActivity.ktapp/src/main/java/org/oppia/android/app/player/exploration/ExplorationActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
PromotedStoryListView.ktapp/src/main/java/org/oppia/android/app/home/promotedlist/PromotedStoryListView.kt
This file is exempted from having a test file; skipping coverage check.
ComingSoonTopicsListView.ktapp/src/main/java/org/oppia/android/app/home/promotedlist/ComingSoonTopicsListView.kt
This file is exempted from having a test file; skipping coverage check.
QuestionPlayerActivity.ktapp/src/main/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
TopicLessonsFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
MarkChaptersCompletedFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/devoptions/markchapterscompleted/MarkChaptersCompletedFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
PlatformParametersFragment.ktapp/src/main/java/org/oppia/android/app/devoptions/platformparameters/PlatformParametersFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
MathExpressionParserFragment.ktapp/src/main/java/org/oppia/android/app/devoptions/mathexpressionparser/MathExpressionParserFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
AdminAuthActivity.ktapp/src/main/java/org/oppia/android/app/profile/AdminAuthActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
AdminPinActivity.ktapp/src/main/java/org/oppia/android/app/profile/AdminPinActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
PinPasswordActivity.ktapp/src/main/java/org/oppia/android/app/profile/PinPasswordActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ProfileChooserFragment.ktapp/src/main/java/org/oppia/android/app/profile/ProfileChooserFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
AddProfileActivity.ktapp/src/main/java/org/oppia/android/app/profile/AddProfileActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ProfileLoginFragment.ktapp/src/main/java/org/oppia/android/app/profile/ProfileLoginFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
SurveyNpsItemOptionView.ktapp/src/main/java/org/oppia/android/app/survey/SurveyNpsItemOptionView.kt
This file is exempted from having a test file; skipping coverage check.
SurveyFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/survey/SurveyFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
SurveyMultipleChoiceOptionView.ktapp/src/main/java/org/oppia/android/app/survey/SurveyMultipleChoiceOptionView.kt
This file is exempted from having a test file; skipping coverage check.
ProfileResetPinFragment.ktapp/src/main/java/org/oppia/android/app/settings/profile/ProfileResetPinFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ProfileRenameFragment.ktapp/src/main/java/org/oppia/android/app/settings/profile/ProfileRenameFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
CreateProfileFragment.ktapp/src/main/java/org/oppia/android/app/onboarding/CreateProfileFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
FractionInputInteractionViewTestActivity.ktapp/src/main/java/org/oppia/android/app/testing/FractionInputInteractionViewTestActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
RatioInputInteractionViewTestActivity.ktapp/src/main/java/org/oppia/android/app/testing/RatioInputInteractionViewTestActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
InputInteractionViewTestActivity.ktapp/src/main/java/org/oppia/android/app/testing/InputInteractionViewTestActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
TextInputInteractionViewTestActivity.ktapp/src/main/java/org/oppia/android/app/testing/TextInputInteractionViewTestActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
AudioLanguageActivityPresenter.ktapp/src/main/java/org/oppia/android/app/options/AudioLanguageActivityPresenter.kt
This file is exempted from having a test file; skipping coverage check.
AudioLanguageActivity.ktapp/src/main/java/org/oppia/android/app/options/AudioLanguageActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
AudioLanguageFragment.ktapp/src/main/java/org/oppia/android/app/options/AudioLanguageFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
BindableAdapter.ktapp/src/main/java/org/oppia/android/app/recyclerview/BindableAdapter.kt
This file is incompatible with code coverage tooling; skipping coverage check.
TestCoroutineDispatchersInjector.kttesting/src/main/java/org/oppia/android/testing/threading/TestCoroutineDispatchersInjector.kt
This file is exempted from having a test file; skipping coverage check.
TestDispatcherModule.kttesting/src/main/java/org/oppia/android/testing/threading/TestDispatcherModule.kt
This file is exempted from having a test file; skipping coverage check.
AsyncResultSubject.kttesting/src/main/java/org/oppia/android/testing/data/AsyncResultSubject.kt
This file is incompatible with code coverage tooling; skipping coverage check.

Refer test_file_exemptions.textproto for the comprehensive list of file exemptions and their required coverage percentages.

To learn more, visit the Oppia Android Code Coverage wiki page

@adhiamboperes adhiamboperes merged commit 0e297f7 into oppia:develop Apr 13, 2026
73 of 81 checks passed
@github-actions
Copy link
Copy Markdown

Fantastic work @anmoltrvd01! Your very first PR to Oppia has been merged! 🎉🥳

You've just taken your first step into open-source, and we couldn’t be happier to have you onboard. 🙌
If you're feeling adventurous, why not dive into another issue and keep contributing? The community would love to see more from you! 🚀

For any support, feel free to reach out to the developer onboarding lead: @adhiamboperes. Happy coding! 👩‍💻👨‍💻

@adhiamboperes adhiamboperes changed the title Fix #5607: Prevent toolbar title truncation in AudioLanguageFragment at 200% font scaling Fix part of #5607: Prevent toolbar title truncation in AudioLanguageFragment at 200% font scaling Apr 13, 2026
@anmoltrvd01 anmoltrvd01 deleted the fix-5607-toolbar-truncation-v2 branch April 13, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants