Is there a good way to remove HTML from a Java string? A simple regex like
replaceAll("\\\\<.*?>", &quo
Use Html.fromHtml
Html.fromHtml
HTML Tags are
, , , , , , , , , , , , , , , , , , , As per Android’s official Documentations any tags in the HTML will display as a generic replacement String which your program can then go through and replace with real strings. Html.formHtml method takes an Html.TagHandler and an Html.ImageGetter as arguments as well as the text to parse. Example String Str_Html=" This is about me text that the user can put into their profile "; Then Your_TextView_Obj.setText(Html.fromHtml(Str_Html).toString()); Output This is about me text that the user can put into their profile 0 讨论(0) 查看其它30个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
, , , , , , , , , , , , , , , , , As per Android’s official Documentations any tags in the HTML will display as a generic replacement String which your program can then go through and replace with real strings. Html.formHtml method takes an Html.TagHandler and an Html.ImageGetter as arguments as well as the text to parse. Example String Str_Html=" This is about me text that the user can put into their profile "; Then Your_TextView_Obj.setText(Html.fromHtml(Str_Html).toString()); Output This is about me text that the user can put into their profile 0 讨论(0) 查看其它30个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
, , , , , , As per Android’s official Documentations any tags in the HTML will display as a generic replacement String which your program can then go through and replace with real strings. Html.formHtml method takes an Html.TagHandler and an Html.ImageGetter as arguments as well as the text to parse. Example String Str_Html=" This is about me text that the user can put into their profile "; Then Your_TextView_Obj.setText(Html.fromHtml(Str_Html).toString()); Output This is about me text that the user can put into their profile
As per Android’s official Documentations any tags in the HTML will display as a generic replacement String which your program can then go through and replace with real strings.
Html.formHtml method takes an Html.TagHandler and an Html.ImageGetter as arguments as well as the text to parse.
Html.formHtml
Html.TagHandler
String Str_Html=" This is about me text that the user can put into their profile ";
This is about me text that the user can put into their profile
Then
Your_TextView_Obj.setText(Html.fromHtml(Str_Html).toString());
Output