Webview of local webpage shows cluttered/repeated text

by jb » Tue, 10 Aug 2010 07:03:40 GMT

Sponsored Links

I display a local webpage (located in my 'assets' directory) within a
Webview. The webpage is almost exclusively text.
When displayed, the middle third of the body of text appears to be
repeated multiple times, and makes the text appear very cluttered.

I ran the webpage through the W3C html validator and it passed without
any errors.

Displaying it on regular browsers work perfectly.

Here's my code:

mWebView = (WebView) findViewById(R.id.webview);
mWebView.setBackgroundColor(0); // make the background transparent
InputStreamReader is = null;
try {
        is = new
        BufferedReader buff = new BufferedReader(is, 8192);
        StringBuffer out = new StringBuffer();
        String strLine = null;
        while ((strLine = buff.readLine()) != null) {
        String mimeType = "text/html";
        String encoding = "utf-8";
        String fin = new String(out.toString());
com.this.that/", fin, mimeType, encoding, "");
} catch (IOException e) {

Any ideas?



Webview of local webpage shows cluttered/repeated text

by Mark Murphy » Tue, 10 Aug 2010 07:20:21 GMT


Try using:



Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://github.com/commonsguy 
 http://commonsware.com/blog  |  http://twitter.com/commonsguy 

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9


Sponsored Links

Other Threads

1. LVL licensing and versioning question


Using the licensing technique described here
I'm trying to test what happens when:
- I would upgrade my LVL protected app to a new version
- Some user hasn't upgraded yet
Will the user with the old version still be able to continue? Will the
licensing server return LICENSED_OLD_KEY as I expect it to, and thus
allow access?

The scenario I used to test this:
- uploaded to market a signed version 1.0.0 (did not publish it) of my
app which has never been published nor uploaded before
- setup test account and let the test response be LICENSED
- on Nexus1 tested and verified that when using the apk (so the one in
<project>/bin), LICENSED is returned.
- increased versionCode and versionName to 1.0.1, signed and uploaded
that version to market (didn't publish)
- on N1 installed the new apk (again the newly compiled one from
<project>/bin). LVL returns NOT_MARKET_MANAGED so indicating that it's
not available in the market. But I expected LICENSED_OLD_KEY to be

Am I trying something that's not possible to test? From other posts
like this one: 

2. HTC Hero

Hi everyone.
Does anyone know if there are differences between the G2 and Hero.
Software differences.
Will the app I wrote for G2 work the same way on a Hero?


Eros Eduardo Stein
Tcnico de Informtica / Em breve analista.
USE >> http://www.ekaaty.org


3. Tablet programming

4. WebServis authentication problem, Android

5. Ethernet auto detection

6. Launching application in Market

7. Fwd: : V4l2 Camera Integration