Normalerweise ist dieses Verhalten nicht dramatisch, aber auf einem Samsung Galaxy S ist der standardmäßige AlertDialog-Hintergrund blau und ein normal formatierter Link (blau) verschwindet. Leider ändert der folgende Code nicht die Farbe der Verbindung.Ändern der Farbe von Hyperlink in AlertDialog
Hat jemand eine Idee?
public void showClickableDialog(String title, String msg) {
final SpannableString s = new SpannableString(msg);
Linkify.addLinks(s, Linkify.ALL);
final AlertDialog d = new AlertDialog.Builder(mContext)
.setPositiveButton(android.R.string.ok, null).setIcon(
R.drawable.logo).setTitle(title).setMessage(s).create();
d.show();
// Make the textview clickable. Must be called after show()
TextView textView = ((TextView) d.findViewById(android.R.id.message));
// Next Line unfortunately does nothing
textView.setTextColor(Color.MAGENTA);
textView.setBackgroundColor(Color.BLACK);
textView.setMovementMethod(LinkMovementMethod.getInstance());
}
Einstellung in styles.xml funktionierte für mich, danke: D – aimango