Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - html from android_assets in WebView, CSS not loading in ICS

I've been writing a small app that basically loads its content from locally stored HTML and CSS into a WebView. I initially started this when I had a device running Android 2.3 and had no issues. I recently got a Galaxy Nexus but the CSS doesn't appear to load in ICS.

I read something that suggested enabling hardware acceleration would help but it does nothing. I'm now at a complete loss. Javascript seems to load fine so, combined with it working well on 2.3, suggests it's not the way I'm loading the CSS.

Has anybody seen anything similar? The app is unusable without some touch-friendly CSS.

Thanks in advance.

Edit: Ideally, I need this to work on all versions of android from 2.2+. Not sure if it makes a difference but I thought it might be relevant.

like image 339
NobleMule Avatar asked Feb 04 '12 17:02

NobleMule


1 Answers

Found the issue! It turns out that there is a rather big bug in the browser for ICS and presumably Honeycomb based on a test. In the logcat I get the following error: Unknown chromium error: -6. Removing the querystring solves the issue (although screws up my functionality). There is a bug report for it here if anyone else is having the same issues.

like image 174
NobleMule Avatar answered Sep 28 '22 01:09

NobleMule