Skip to content
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

Fixed #1116 Situation Dialog Html Parsing #1120

Merged
merged 1 commit into from
Feb 25, 2024

Conversation

amrhossamdev
Copy link
Member

Fixed #1116

Screenshot_1708804337 Screenshot_1708804437

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Apply the AndroidStyle.xml style template to your code in Android Studio.

  • Run the unit tests with gradlew connectedObaGoogleDebugAndroidTest to make sure you didn't break anything

  • If you have multiple commits please combine them into one commit by squashing them for the initial submission of the pull request. When addressing comments on a pull request, please push a new commit per comment when possible (reviewers will squash and merge using GitHub merge tool)

@CLAassistant
Copy link

CLAassistant commented Feb 24, 2024

CLA assistant check
All committers have signed the CLA.

@amrhossamdev amrhossamdev changed the title Fixed #1116 Html Situation Dialog Html Parsing Fixed #1116 Situation Dialog Html Parsing Feb 24, 2024
Copy link
Member

@aaronbrethorst aaronbrethorst left a comment

Choose a reason for hiding this comment

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

Thank you for your submission! I have one question for you in a review comment, and then please also verify that your changes work as expected for another region that isn't using HTML, like San Diego or Puget Sound.

@@ -154,16 +155,18 @@ public void onClick(DialogInterface dialog, int which) {
}
});

final androidx.appcompat.app.AlertDialog dialog = builder.create();
Copy link
Member

Choose a reason for hiding this comment

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

what's the impact of using the built-in AlertDialog instead of the androidx version on an older Android device? (e.g. Android 5)

Copy link
Member Author

Choose a reason for hiding this comment

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

it's actually android x, i have just imported it in imports line 30

import androidx.appcompat.app.AlertDialog;

instead of declaring an object with package name.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, i have tested it with non html tags strings & also for hyberlinks and it works fine.
Screenshot from 2024-02-25 02-37-59


if (desc != null) {
desc.setText(Html.fromHtml(args.getString(DESCRIPTION)));
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

@aaronbrethorst aaronbrethorst left a comment

Choose a reason for hiding this comment

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

looks great, thank you so much!

@aaronbrethorst aaronbrethorst merged commit 8289601 into OneBusAway:main Feb 25, 2024
2 checks passed
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.

HTML Parsing Issue : Incorrect parsing of HTML tags in Situation Dialog
3 participants