title: Formatting Open Source Licences ala StackOverflow/Github
body: <p>In my project I want to include a Dialog that shows the open source licences of the libraries I use in the application. Particularly though, I want them to look a lot like this: </p>
  
  <p><img src="https://i.stack.imgur.com/hirIe.png" alt="enter image description here"></p>
  
  <p>That's how it looks on Github, I also noticed that Google plus for android includes a <a href="http://db.tt/0ctRRN9f" rel="nofollow noreferrer">look-alike formatting</a> for their OSLicences, but despite of trying, I can't really get it to look the same way. </p>
  
  <p>So based on the Google Plus and Github implementations, I can get the following: </p>
  
  <ul>
  <li>A WebView is required to display the content. </li>
  <li>Github uses <code>pre</code> and <code>code</code> html tags to wrap the content. </li>
  </ul>
  
  <p>I had read somewhere that I could use <a href="https://code.google.com/p/google-code-prettify/" rel="nofollow noreferrer">Prettyfy</a> for this job. Well, I tried, but I'm not sure if I'm supposed to select a specific theme, or a specific language in the params, since on my end I have: </p>
  
  <pre><code>&lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;link href="prettify.css" type="text/css" rel="stylesheet" /&gt;
  &lt;script type="text/javascript" src="prettify.js"&gt;&lt;/script&gt;
  &lt;title&gt;Open Source Licences&lt;/title&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>and then for the body: </p>
  
  <pre><code>&lt;body onload="prettyPrint()"&gt;
  &lt;pre class="prettyprint"&gt;
  /*Copyright 2012 Jeremy Feinstein
  *
  *Licensed under the Apache License, Version 2.0 (the "License");
  *you may not use this file except in compliance with the License.
  *You may obtain a copy of the License at
  *
  *http://www.apache.org/licenses/LICENSE-2.0
  *
  *Unless required by applicable law or agreed to in writing, software
  *distributed under the License is distributed on an "AS IS" BASIS,
  *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  *See the License for the specific language governing permissions and
  *limitations under the License.
  */
  &lt;/pre&gt;
  </code></pre>
  
  <p>But my end result <a href="http://db.tt/5NNOxD40" rel="nofollow noreferrer">doesn't look all that great</a>. Keep in mind I did try a not commenting the licence, but that result was even worse, since prettify was highlighting <strong>all</strong> of the keywords inside the licence. </p>
  
  <p>Any ideas? Maybe it's something simpler than I thought, but I just can't figure it out. </p>