6

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.

2
  • Aditional info I've created a test html and css file that has less on it to see if there is anything in either file that could cause the problems I've seen. The css on the body just had background-color of black and color of white and the html just had a <p> in the body with some content but it still rendered as if there was no CSS being loaded. Commented Feb 5, 2012 at 13:07
  • Styles embedded in the HTML seem to work... but this is impractical in an app with multiple pages. Any ideas? Commented Feb 5, 2012 at 13:10

1 Answer 1

7

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Note that you also can't load any CSS or JavaScript resources which use the query string either. This tripped me up for a good while.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.