Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Android Lists and Adapters (2015) Standard ListViews Creating a Gradient Drawable

Finally, specify the 'type' as linear and set the 'angle' to 135. This gives an angled gradient from the lower right cor

help?

bg_gradient.xml
<shape xmlns:android="http://schemas.android.com/apk/res/android">

       <gradient
                 android:startColor="#102372"
                 android:endColor="#ffffff"/>
       <gradient
                 android:startColor="#102372"
                 android:endColor="#ffffff"/>

   <gradient
                 android:angle="135"
                 android:type="linear"/>
 </shape>

3 Answers

Jacob Bergdahl
Jacob Bergdahl
29,119 Points

Don't put those properties in a new <gradient>! Instead, put them in the your former gradients. Remember that they are attributes that you apply to your already existing gradient(s).

Harry James
Harry James
14,780 Points

Marking this as the Best Answer as asker has confirmed that this fixed the issue.

thanks hey, it worked

thanks hey, it worked