title: Leveraging resource system with WebView and "file:///android_res/" for .css files
body: <p>I am trying to do a reading type application, where I am downloading html-formatted articles and displaying them in a <code>WebView</code> and styling them with local .css from assets.</p>
  
  <p>I load it all with <code>webView.loadDataWithBaseURL("file:///android_asset/", html, "text/html", "UTF-8", null);</code></p>
  
  <p>However, the problem is that .css uses <code>px</code> as a unit, so I guess this wont fly, and I want to adjust the values for using on tablets and different orientations as you would normally do. Then I heard, that WebView is able to load stuff from resources with <code>"file:///android_res/"</code> as base url.</p>
  
  <p>So I was wondering, I could use this to my .css file in <code>/raw</code> folder, and leverage the resource system with qualifiers <code>/raw-land</code>, <code>/raw-sw720</code> etc., like you normally would when styling layouts.</p>
  
  <p>Unfortunatelly, this doesnt seem to work, even if I do something like <code>"file:///android_res/raw/land/"</code> but hardcoding the path kinda defeats the purpouse anyways.</p>
  
  <p>So .. is there any solution to this? My biggest worry is using pixels as units, but webview seems to adjust stuff on its own, right?</p>
  
  <p>Thanks!</p>