I am going through test example. Where for some Image background they are using gradient, the code goes like this
<?xml version="1.0" encoding="utf-8"?>
  <shape xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient
        android:startColor="#ff0000"
        android:centerColor="#00ff00"
        android:endColor="#0000ff"
        android:angle="180"/>
    <corners android:radius="5dp" />
   </shape>
In the above xml I didn't get angle attribute. but when I change the value of angle slightly the pattern slants. Can anyone explain me how exactly it works?




