You just need to create a drawable resource (see an example below), and add it to the layout you created for your ListItem.
The drawable (in your resdrawable folder - name it whatever - listgrad.xml for ex) could look like:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="@color/gradient_start"
android:endColor="@color/gradient_end"
android:angle="-270" />
</shape>
The you would add it to the layout for your list item (the layout.xml file you define for this) like this code snippet:
<TextView
android:id="@+id/ranking_order"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/list_grad"
/>
...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…