Note that there are some explanatory texts on larger screens.

plurals
  1. POHeight in HTML Content in Textview - Android
    text
    copied!<p>Good day!</p> <p>I have an application that uses html.fromhtml() to style my paragraph content.</p> <p>But i don't have any control of the <code>&lt;br&gt;</code> or the <code>&lt;p&gt;</code> tag in terms of the spacing (vertical) they created since css is not working in android.</p> <p>Is there anyway how to do it?</p> <p>Here is my code so far:</p> <pre><code> con.setText(Html.fromHtml("&lt;b&gt;Lorem Ipsum Dolor&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;" + "&lt;p&gt;Lorem Ipsum Dolor&lt;/p&gt;"+ "&lt;p&gt;Crest PTY 1000&lt;/p&gt;" + "&lt;p&gt;Phone: (02) 8217-1300&lt;/p&gt;"+ "&lt;p&gt;BSB 032-0052&lt;/p&gt;&lt;br/&gt;" + "&lt;b&gt;Trading Hours&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;"+ "&lt;p&gt;Monday – Thursday 9:30am – 4:00pm&lt;/p&gt;" + "&lt;p&gt;Friday 9:30am – 5:00pm&lt;br/&gt;&lt;/p&gt;" + "&lt;p&gt;Saturday 10:00am – 1:00pm&lt;/p&gt;&lt;br/&gt;"+ "&lt;b&gt;Languages&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;"+ "Mandarin, Cantonese, Bahasa Indonesia,&lt;br/&gt;&lt;br/&gt; Japanese, Vietnamese, Greek&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;"+ "&lt;b&gt;Morning Style&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;"+ "Safe deposit box - This one&lt;br/&gt;"+ "Internet Banking kiosks&lt;br/&gt;"+ "Night safe&lt;br/&gt;" + "Coin Deposit Machine&lt;br/&gt;" + "Cash Exchange Machine&lt;br/&gt;" + "Migrant Services&lt;br/&gt;&lt;br/&gt;")); </code></pre> <p>Screenshot</p> <p><img src="https://i.stack.imgur.com/hRTFk.png" alt="enter image description here"></p> <p>Any help is very much appreciated</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload