title: Android Textview Spannable disregards newlines and trailing whitespace
body: <p>I'm trying to display a piece of code in a <code>TextView</code>. The code lines are spanned in <code>&lt;pre&gt;&lt;code&gt;</code> tags. Before calling <code>Html.fromHtml()</code> on the <code>String</code>, I can clearly see the tabbing and newlines, but when I call the <code>fromHtml()</code> to convert it to a <code>Spannable</code>, it loses all whitespacing in the <code>&lt;pre&gt;&lt;code&gt;</code> tags.</p>
  
  <p>Here is how it looks before <code>fromHtml</code>:</p>
  
  <p><img src="https://i.stack.imgur.com/Ydban.png" alt="before"></p>
  
  <p>And here is how it looks after <code>fromHtml</code>:</p>
  
  <p><img src="https://i.stack.imgur.com/o9LeN.png" alt="after"></p>
  
  <p>This of course is very hard to read. How should I try fixing it? Keep in mind that it only happens on newlines and whitespaces in the <code>&lt;code&gt;</code> tags. The <code>&lt;p&gt;</code> tags handle newlines fine.</p>