-4

In my menu I have a TextView with a link to Google Calendar, my problem is that I can't modify the color and the underline of this one.

Because My TextView should be gray and not underlined, but it is blue and underlined, as a web link. I try many solutions, but nothing succeed...

If someone could help me, please !

R. García
  • 815
  • 9
  • 20
Simon
  • 1
  • 6

1 Answers1

0

With that, My text is perfect, white and not underlined, but the link doesn't works

    TextView t2 = (TextView) findViewById(R.id.OngletAgenda);
    t2.setMovementMethod(LinkMovementMethod.getInstance());

    SpannableString content = new SpannableString("Mon Agenda");
    content.setSpan(new UnderlineSpan(), 10, content.length(), 0);
    t2.setText(content);
Simon
  • 1
  • 6
  • what about [this] (https://stackoverflow.com/questions/2734270/how-do-i-make-links-in-a-textview-clickable) – ruben Apr 24 '18 at 10:20
  • @ruben Already did it, but I found a new sample code: https://stackoverflow.com/a/23143879/9480041 but now the problem is the color, I'm near the issue but it's frustrating – Simon Apr 24 '18 at 10:25