45 questions
0 votes
1 answer
60 views
font size is not working when using from html
I have a textview in an Android application. I want to set the textview's value from HTML. For example, I get a value like this: <span style="font-family:'Roboto-Regular'; font-size:13px; ...
0 votes
1 answer
177 views
Xamarin.Android hyperlink in middle of text not working
Goal: Have a word in the middle of a sentence be a hyperlink that opens the website in a browser What's happening: It looks like a hyperlink, but nothing happens when I click What I've tried: I tried ...
0 votes
0 answers
76 views
Android : spannablestring shows HTML tags issue
hi in my string im getting <br > after using spannable string my text is hi<br />@dry12 <br /><br />hi all<br /><br />@akjhv here is my code SpannableString ss = ...
0 votes
1 answer
303 views
How to make an Image Getter in a RecyclerView using fromHTML more efficient?
I'm using fromHTML to load HTML text into a TextView inside a RecyclerView element. This does work, however it is incredibly slow as the images are being loaded from a URL and when the adapter is set ...
1 vote
1 answer
2k views
Android TextView fromHtml() how to support unsupported css style, text size?
I'm using this: HtmlCompat.fromHtml(html, HtmlCompat.FROM_HTML_MODE_LEGACY); How to add support of text size regarding a fact that font-size isn't natively supported? I don't want to override whole ...
0 votes
1 answer
162 views
How can I increase the font size in Html.fromHtml?
This code shows a View window, and displays a text document in HTML format. I think the function is clear so: All colors and formats work, but the font all comes in a default size and is rather small. ...
0 votes
1 answer
124 views
Android, format text from Json to HTML removes new lines and white spaces
The text is received from a Json is like this: This is sentence 1. This is <b>sentence 2</b>. And I use this code to format to HTML and pass it to a textView: private void ...
3 votes
1 answer
441 views
Android HtmlCompat.toHtml(Spanned) returns improperly nested HTML tags
I have an Edittext (binding.text using view binding) that contains text styled with StyleSpans, i.e. bold and italics. To save the formatted text, I use HtmlCompat.toHtml(spannable) in Kotlin to ...
1 vote
1 answer
115 views
TextView HTML with anchor link
I have a text in HTML with links external and internal (page navigation). When I use this text in Html.fromHtml and display it in a TextView, external links work, but inside the page itself, it does ...
1 vote
1 answer
3k views
How to add font style to textview android kotlin
I need help, i am stuck in this. My requirement is, I need to add text inside a tooltip. I did that actually. But the text include multiple line text also some lines having bold style other line ...
0 votes
1 answer
45 views
Does the Html.fromHtml in android only works in displayed texts?
Because i'm comparing the user Answer and the correct answer if(etU1.getText().toString().equals(cquestion.get(0).getAnswer())) Example the choice is "Brad's Drink" and even though the user types it ...
1 vote
0 answers
378 views
jsPDF - fromHTML does not write at the correct page
I am doing a small project with jsPDF. I need to write colored text, changing the font size and using bold text. Therefore fromHtml is my choise, because i can easyly do it with css and html. The ...
3 votes
0 answers
44 views
ImageSpan adds space above image in some API level
I convert HTML string to spannable by using HtmlCompat.fromHtml(...), the ImageGetter I use simply uses Glide to download images. By using ContextCompat.getDrawable(...) for comparison it gives ...
0 votes
3 answers
2k views
Issue with fromhtml method in jspdf lib
I need to convert html to pdf and I found jspdf lib. But I ran into a ropblem. If <p> tag contains some text inside like this: text<br /><br />text it not works. I have a following ...
1 vote
0 answers
271 views
android.text.html (fromHtml): render inline CSS colors
I have a text like this: <b style="color: rgb(255, 0, 0);">Test</b> which is given to Html.fromHtml call, which returns a Spanned used in a StaticLayout drawn on an Android Canvas bound to ...