Yes, String resource xml supports the same HTML.
<resource>
<string name="your_string_here">This is an <u>underline</u>.</string>
</resources>
If you do the content in this way, there is an underline in the part that corresponds to the content.
Also, on the code,
TextView textView = (TextView) view.findViewById(R.id.textview);
SpannableString content = new SpannableString("Content");
content.setSpan(new UnderlineSpan(), 0, content.length(), 0);
textView.setText(content);
You can do it like this.
© 2024 OneMinuteCode. All rights reserved.