0

I have this code:

public static HashMap<String, List<String>> getInfo()

{

HashMap<String, List<String>> Conteudo = new HashMap<String, List<String>>();

List<String> Areas_Processos = new ArrayList<>();

Areas_Processos.add("<>start of bold directive<>"+"4 - text four"+"end of bold directive<>");

...

}

The output is <>start of bold directive<>4 - Text four <>end of bold directive<>, showing the directives to format the texts.

My expectation is to have the text in bold format, like this: "4 - Text four"

Any ideas?

TylerH
  • 20,799
  • 66
  • 75
  • 101

1 Answers1

0

It looks like you're trying to use bold html tags, I haven't seen <>start of bold directive<> before. If you can/want to use <b></b> tags then you can use Android's Html.fromHtml method:

textView.setText(Html.fromHtml("<b>This will be bold.</b> This will not"));
roarster
  • 4,058
  • 2
  • 25
  • 38