Android: Using linear gradient as background looks banded

Posted by user329692 on Stack Overflow See other posts from Stack Overflow or by user329692
Published on 2010-05-28T10:05:44Z Indexed on 2010/05/28 10:12 UTC
Read the original article Hit count: 987

Filed under:
|
|
|

Hi All! I'm trying to apply a linear gradient to my ListView. This is the content of my drawable xml:

 <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient 
        android:startColor="#3A3C39" 
        android:endColor="#181818"
        android:angle="270"
     />
    <corners android:radius="0dp" />
</shape>

So I apply it to my ListView with:

android:background="@drawable/shape_background_grey"

It works but it looks very "banded" on emulator and on a real device too.

Is there any way to reduce this "behaviour"?

© Stack Overflow or respective owner

Related posts about android

Related posts about background