How do you underline a text in Android XML?

前端 未结 10 1021
不思量自难忘°
不思量自难忘° 2020-12-04 14:57

How do you underline a text in an XML file? I can\'t find an option in textStyle.

10条回答
  •  北荒
    北荒 (楼主)
    2020-12-04 15:46

    To complete Bhavin answer. For exemple, to add underline or redirection.

    ((TextView) findViewById(R.id.tv_cgu)).setText(Html.fromHtml(getString(R.string.upload_poi_CGU)));
    
    conditions générales]]>
    

    and you can know compatible tag here : http://commonsware.com/blog/Android/2010/05/26/html-tags-supported-by-textview.html

提交回复
热议问题