I'm having a slightly strange problem, I'm using a WebView widget in a page, when I put HTML in the widget using loadData it works fine, however if I include a <style> tag in the HTML the widget goes blank and doesn't show any details.
The initial code is
Using java Syntax Highlighting
- WebView oBrowser = (WebView)this.findViewById(R.id.wineResultHTMLViewer);
- String szHTML = "<html><head><title>Wine Detail</title><style type=\"text/css\">.moo {color: #000000;}</style></head><body><div class=\"wine\"><div class=\"header\"><h1>1972 Achaia Clauss Nemea</h1></div><br clear=\"all\"/><div class=\"winelabel\"> </div></body></html>";
- oBrowser.loadData(szHTML, "text/html", "UTF-8");
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
This should do nothing more than display a peice of text in H1 on the page. However it just displays a blank screen, removing the section which says
Using java Syntax Highlighting
- <style type=\"text/css\">.moo {color: #000000;}</style>
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
For reference the XML is :-
Using xml Syntax Highlighting
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" >
- <AutoCompleteTextView android:id="@+id/edit"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:completionThreshold="3" android:height="44px"/>
- <WebView android:id="@+id/wineResultHTMLViewer"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- />
- </LinearLayout>
Parsed in 0.002 seconds, using GeSHi 1.0.8.4
Any help is apprechiated!
Thanks
mitch

