% character not displayed correctly by WebView?

by Inderjeet Singh » Fri, 19 Dec 2008 21:43:49 GMT

Sponsored Links
 The following code snippet produces a weird browser error (Web page not
available) on WebView:

    String message = "<html><body>Show Percent: 38% </body></html>";
    WebView mWebView = (WebView) activity.findViewById(R.id.my_web_view);
    mWebView.loadData(message, "text/html", "en_US");

The offending character is "%".  I tried using the entity code for %, but it
made no difference. Anyone knows what is going on?


% character not displayed correctly by WebView?

by joshv » Fri, 19 Dec 2008 22:21:35 GMT

 Use loadDateWithBaseURL - pass it a dummy base URL.


Sponsored Links

Other Threads

1. How to delete files from Android device file system


I would like to delete file under "/data/etc/test" on my device which
has android FroYo.

I made an APK which does this using following lines of code:
String test = "/data/etc/test";
File file = new File(test);

if (file.exists())


Here in above code, it returns true for "file.exists()" but while
delete() call, it always returns FALSE.

I've included following permissions in my manifest file:
android:name="android.permission.ACCESS_CHECKIN_PROPERTIES" />
android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
android:name="android.permission.CLEAR_APP_CACHE" />
android:name="android.permission.DELETE_CACHE_FILES" />
android:name="android.permission.DELETE_PACKAGES" />
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
android:name="android.permission.WRITE_SECURE_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" /
android:name="android.permission.WRITE_SYNC_SETTINGS" />

I put my "test" file under "/sdcad" and that works fine, (i mean
deletes file) but same is not happening from /data/etc/....

Any help would be really appreciated.

Thanks in advance.



2. DB changes for next version, how to debug?

I see that I need to do some queries to back up the data in the
onUpgrade method. My question is how do I test the two versions to
upgrade from X to Y without touching the actual marketplace?


3. problem parsing the package

4. Problem with AudioRecord--java.lang.IllegalStateException: Unable to retrieve AudioRecord pointer for setPositionUpdatePeriod()

5. Back button problem

6. andriod

7. ant build seems to be broken on lib-projects with Android 2.3 SDK