Skip to content

Commit

Permalink
Fix OneBusAway#1116 Html parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
amrhossamdev authored and aaronbrethorst committed Feb 25, 2024
1 parent d134101 commit 8289601
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.Html;
import android.text.TextUtils;
import android.text.style.ClickableSpan;
import android.view.View;
Expand Down Expand Up @@ -154,16 +155,18 @@ public void onClick(DialogInterface dialog, int which) {
}
});

final androidx.appcompat.app.AlertDialog dialog = builder.create();
final AlertDialog dialog = builder.create();
dialog.show();

// Set the title, description, and URL (if provided)
TextView title = (TextView) dialog.findViewById(R.id.alert_title);
title.setText(args.getString(TITLE));

TextView desc = (TextView) dialog.findViewById(R.id.alert_description);
desc.setText(args.getString(DESCRIPTION));

if (desc != null) {
desc.setText(Html.fromHtml(args.getString(DESCRIPTION)));
}
TextView urlView = (TextView) dialog.findViewById(R.id.alert_url);

// Remove any previous clickable spans just to be safe
Expand Down

0 comments on commit 8289601

Please sign in to comment.