SoFunction
Updated on 2025-04-04

Summary of several methods of underlined TextView in Android

If it is in the resource file:

<resources>
  <string name="hello"><u>phone:0123456</u></string>
  <string name="app_name">MyLink</string>
</resources>

If it is in the code:

TextView textView = (TextView)findViewById(.tv_test); 
(("<u>"+"0123456"+"</u>"));

The code can be like this:

().setFlags(Paint. UNDERLINE_TEXT_FLAG ); //Underline().setAntiAlias(true);//Anti-aliasing

The above is the summary of the several methods of underlined TextView in Android brought to you by the editor. I hope everyone supports me~