diff --git a/onebusaway-android/src/main/java/org/onebusaway/android/ui/SituationDialogFragment.java b/onebusaway-android/src/main/java/org/onebusaway/android/ui/SituationDialogFragment.java index 700dacd4b..4133138fd 100644 --- a/onebusaway-android/src/main/java/org/onebusaway/android/ui/SituationDialogFragment.java +++ b/onebusaway-android/src/main/java/org/onebusaway/android/ui/SituationDialogFragment.java @@ -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; @@ -154,7 +155,7 @@ 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) @@ -162,8 +163,10 @@ public void onClick(DialogInterface dialog, int which) { 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