-
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
In Terms of Service the website should be displayed as link and should be clickable #4760
Comments
This seems like a reasonable thing to fix with auto links. |
Can you assign this task to me? |
@SidharthMudgil Please follow the instructions here for claiming an issue. You will need to provide an explanation of how you would fix it, and (if possible) a demo of the working fix. I would also recommend reading and following the other instructions on that page if you haven't already done so. Thanks! |
Hi @BenHenning, Can I work on this issue? SolutionSurrounding the link in Old Code
New Code
Outputsolution.mp4 |
@SidharthMudgil this wasn't mentioned earlier, but the solution needs to be done without changing the XML files for the content (since we'll eventually be generating it based on the versions stored in https://github.com/oppia/oppia). This should be solvable without changing the XML. |
Hi, @BenHenning I solved the issue by adding these 2 lines in app/src/main/res/layout/policies_fragment.xml
Output Screenrecorder-2023-02-17-12-56-13-970.mp4 |
@BenHenning as we see @pratyaksh1610 is make PR #4771 which is now Stale due to inactivity. |
@SidharthMudgil I think make PR for this directly if it's looks good then reviewers will automatically merge it. |
Yup, it's fine to make a PR any time if there aren't any existing viable PRs for a given issue (and you can assign the contributor to the issue if you agree with the proposed solution approach). |
Okay sure @seanlip Thanks for your reply. |
Hi @BenHenning @MohitGupta121, Adding the |
@SidharthMudgil you may need to look at how Android's TextView handles the attribute. We manually set the movement method today, so I suspect we can use something like HtmlCompat linkify programmatically to get the links to have correct URLSpans. |
@BenHenning How about this solution? https://stackoverflow.com/a/34793313/16177121 |
@SidharthMudgil I think that approach makes sense and is in-line with what I was thinking (though as a nit we should use LinkifyCompat rather than Linkify). |
@BenHenning As per your suggestion, Please check my PR #4917 |
@shakivhussain this issue is currently assigned to @Uticodes. |
Note to developers: Please see #4918 and comments for the proposed solution to this issue. |
Hey @theMr17, this issue can be solved using the SpannableStringBuilder object. |
@adhiamboperes SpannableStringBuilder should be preferred because we can have the flexibility to decide what happens when the link is clicked, not just opening a link. Plus, it's easier to change the appearance of the link (colors, textStyles). Also SpannableStringBuilder is faster and more efficient because it won't scan the whole string ( we can simply pass a span range i.e. start index to end index) |
@adhiamboperes I am facing an error
|
… link and should be clickable
… link and should be clickable
… link and should be clickable
… link and should be clickable
… link and should be clickable.
… link and should be clickable.
… link and should be clickable.
… and should be clickable. (#5213) ## Explanation Fix #4760 In Terms of Service the website should be displayed as link and should be clickable This Solution uses SpannableString to solve the the issue. We get the url from html spannable using regex and then set a span around it to make the link clickable. ## 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 <!-- Delete these section if this PR does not include UI-related changes. --> If your PR includes UI-related changes, then: - Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes - For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see [RTL guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines)) - Add a video showing the full UX flow with a screen reader enabled (see [accessibility guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide)) - For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included - Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing ## Demo Video [oppia-.webm](https://github.com/oppia/oppia-android/assets/110051718/2d5b5bf5-3aad-43da-8b41-7146620e75ab) --------- Co-authored-by: Tejas-67 <[email protected]> Co-authored-by: Adhiambo Peres <[email protected]>
Describe the bug
In Terms of Service the website should be displayed as link and should be clickable
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The link https://www.oppia.org should be displayed as a link and it should be clickable.
The sentence ' Thanks for your interest in Oppia Foundation Inc., a nonprofit that operates the website located at https://www.oppia.org (the Website).'
Website is mentioned twice in the statement.
Demonstration
If applicable, add screenshots or videos to help explain your problem.
Environment
Device/emulator being used: Infinix smart 5A
Android or SDK version (e.g. Android 5 or SDK 21): Android version 11
App version (you can get this through system app settings or via the admin controls menu in-app): 0.10-beta-5e64fae55e
The text was updated successfully, but these errors were encountered: