Android Mach Banding Images

I used a linear gradient image for the background, and in Photoshop (and everything else) it looked nice and smooth, but when I displayed it in the emulator, it was grouped! Even worse, it was connected to my real phone - Droid Incredible. I run 2.2 both in emulation and on the phone.

Here the sample is the original on the left, the Android version on the right: http://pnart.com/temp/AndroidMach.jpg

It looks like Android setting a bit depth limit. What is happening and how to fix it?

Thanks in advance!

+3
source share
5 answers

Google. , , , res/raw/ , . , .

, , , "drawable", AAPT, , , , . PNG , APK. - ( ) , .

+2

: (: : w: 320px h: 480px 200 dpi )

,

0

, , , . - , "" . , , ImageView ( - ), , , .

, , GradientDrawable

0

, , . 8-8-8 R-G-B, 5-6-5. , /, , , .

, №1: .

, , , !

1) , : , :

setContentView(R.layout.screen_dashboard);
findViewById(R.id.layout).getBackground().setDither(true);

2) : 5-6-5 png. . 5-6-5 , png , png.

0

, Shape Drawable, , ( , ) .

0

Source: https://habr.com/ru/post/1773526/


All Articles