Can underline words in TextView text

前端 未结 5 1438
野趣味
野趣味 2021-02-02 09:45

Is there possibility in android to provide TextView some text in Java code with setText(text) function with basic tags like and to make marked words underlined ?

5条回答
  •  遥遥无期
    2021-02-02 10:29

    tobeunderlined= some text here which is to be underlined 
    
    textView.setText(Html.fromHtml("some string"+tobeunderlined+"somestring"));
    

提交回复
热议问题