-
Notifications
You must be signed in to change notification settings - Fork 527
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
Text unit is set in dp instead of sp #4735
Comments
Android 12-specific issue, and one that has marginal benefits so considering it an a11y nice-to-have. Not release blocking. |
Ah actually, this might not be 12-specific if the text itself is using the wrong unit. That being said, we just changed the way titles work back to the old flow so this may no longer be an issue. |
Just tested it and its still an issue and I have updated the issue description to mention one possible solution. |
Hey @rt4914 when I am trying to add toolbar as proposed in the example, the system toolbar and my toolbar both are displayed simultaneously and plus when I am changing the title oppia-android/app/src/main/java/org/oppia/android/app/profile/AdminAuthActivityPresenter.kt Line 119 in da80fab
|
@Akshatkamboj14 I cannot confirm the exact issue without the PR, but the main changes that you will need to apply in are the activity file, its corresponding xml file and may need to change Also, I am a bit inactive these days, so please assign these issues to @MohitGupta121 or @BenHenning or any other active team-member for faster replies. Thanks. |
Hi @adhiamboperes, |
Hi @adhiamboperes , please allow me to work on this issue |
Hi @void-iish, thanks for your interest in contributing to this issue, but it is already assigned to @prafulbbandre. Why don't you take a look at other unassigned issues here, and let me know which one interests you? |
can i work on this issue ? |
@Vishwajith-Shettigar, we ask that you give us a brief description of how you would go about solving the issue, or otherwise put up a draft pull request. |
Here is my approach
Can you tell me am I going right please, that would be really helpful. |
i have made a draft pull request #5132, please guide me. |
Here is a new pull request #5134. Hope this works. |
## Explanation Fix #4735 , Added toolbar in admin_pin_activity xml file inorder to control the title size using sp. <!-- - Explain what your PR does. If this PR fixes an existing bug, please include - "Fixes #bugnum:" in the explanation so that GitHub can auto-close the issue - when this PR is merged. --> ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only Before fix Admin pin activity | Light mode| |--------| |![before light](https://github.com/oppia/oppia-android/assets/76042077/e80cd747-b04c-43c5-96b9-848dc5db3400) | After fix |Light mode| Dark mode| |-----------|--------------| | ![afterlightmode](https://github.com/oppia/oppia-android/assets/76042077/4445ebd1-3fde-40f4-a4cb-cb3716aad43e) | ![afterdarkmode](https://github.com/oppia/oppia-android/assets/76042077/98bd0994-5f4d-464f-b170-d21e167a9eaa) | Co-authored-by: Adhiambo Peres <[email protected]>
Describe the bug
The text unit is dp instead sp which results in an accessibility error.
To Reproduce
Steps to reproduce the behavior:
Suggested Solution:
If you notice code of https://github.com/oppia/oppia-android/blob/da80fab4a78997cb8ab190292f0676117f2722fc/app/src/main/res/layout/admin_pin_activity.xml
we are not using any
Toolbar in this xml file
. Instead we are setting the title fromoppia-android/app/src/main/java/org/oppia/android/app/profile/AdminAuthActivityPresenter.kt
Line 119 in da80fab
What we can do is that instead of using the toolbar/action-bar of activity we can introduce our own
Toolbar
in xml file and can use it in activity & its presenter to set the text. This way we can easily control sp vs dp metric.Similar Implementation
Environment
The text was updated successfully, but these errors were encountered: