I use a WebView to display JPGs to users. The WebView allows me to
easily add zooming functionality without having to write the code to
actually do it.

Anyway, I've been getting a lot of Bug reports from users with an HTC
Incredible that the zooming is broken. I bought an HTC Incredible, and
tested and sure enough zooming causes the WebView to be surrounded by
a box. It's difficult to explain, but basically panning and zooming is
not possible. The only way I can get the WebView to properly display
the JPG is by setting setBuiltInZoomControls(false).

I ran the app on another 2.1 phone (Droid), and it works fine. Works
fine on my Nexus One, and even in the 2.1 Simulator.

Anyone else run into this problem?

Here's the code i have for my WebView:

webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setLoadsImagesAutomatically(true);
webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setBuiltInZoomControls(true);
webview.setInitialScale(initialScale);

Then I just do:

webview.loadUrl("file://" + getFilesDir() + "/" + filename);


Thanks,
Felix

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to