How I can add borders around specifically selected text in a text view like this?
I have recelerview in the activity and the data showing in picture is get from server using API, the API send data wrap with HTML tags like
"<div style=“border:2px solid red;padding: 5px;border-radius: 25px;”>the ground.</div>"
But the border tag is not supported by either Android nor iOS. I need to find a way to show border on both iOS and Android. If I need to communicate with a web team for a change I can do this, but any help will be appreciated.
Note: we cannot use Webview, because we need to perform some other operation on each text row.
Check the following line of code. I think this piece of code helpful for you:
<div style="border:3px; border-style:solid; border-color:#000000; padding: 1em;">the ground.</div>
If you want get border in your text, set your html like this
<div style="border:2px; border-style:solid; border-color: red; padding: 1em ; display: inline-block; border-radius: 25px;">the ground.</div>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.