I want to display an image from an url with an Webview at Android.
With Android phones with Version 1.5 and 1.6 there is no problem. but the same pic and the same code on an AndroidPhone with Version 2.0 and the pic is totaly pixelated.
Like Android is resizing the image first to a smaller one and then resizing it back to "normal" size.
Unfortunately its important to display the pic without any quality loss.
I tried to integrate it in the sourcefolder to show it as an normal image, but at Android 2.0 i get an exception because the image is to big. (At Android 1.6 there is no problem)
Any ideas how i can display the image without quality loss with Android 2.0 ?
If you have not already done it, add this to your manifest :
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true"
android:anyDensity="true" />
Without this, everything will be scaled.
Also, if you dont want your device/emulator to scale your drawables you have to create drawables for each density by putting a higher resolution version into hdpi folder
res/drawable-ldpi/my_icon.png // icon image for low density
res/drawable-mdpi/dpi/my_icon.png // icon for medium density
res/drawable-hdpi/my_icon.png // icon image for high density
Use android:resizeable="true"
instead of android:resizable="true"
.
There is a missing "e"
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With