Question

I use ImageView to display .png images. On emulator its quality is very bad, but on phones Sony Xperia P and Galaxy S III it looks perfect. So i thought its only emulator fault.

Then i tried my app on other device HTC Desire Z and there again i saw very bad quality. What can be reason for that because resolution difference isnt that big. Could that be OS fault ? On Desire its v2.2 on Sony and Samsung its v4.0+ . Very confused.

   <RelativeLayout android:layout_width="match_parent"
            android:layout_weight="1"  
            android:layout_height="wrap_content">

<ImageView
    android:id="@+id/imgD"

    android:layout_width="wrap_content"
    android:layout_height="wrap_content"

    android:scaleType="fitStart"
    android:src="@drawable/imgD" />

Image size is scaled down using

Was it helpful?

Solution 2

And answer is because of different OS versions. Everything looks good on Android versions 2.3+

OTHER TIPS

If you are using PNG-24 (24 bit) images on devices with 16 bit colors displays you will get an effect which is called PNG banding. You should check what color depth your images have and what color depth the displays have on which the effect occurs to verify if this is the reason for your issue. Maybe using PNGs with lower color depth for your application would solve the problem (if you can go with the loss of color depth).

For more information check the links:

Color Banding:

http://commons.wikimedia.org/wiki/File:Colour_banding_example01.png

http://en.wikipedia.org/wiki/Color_banding

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top