まずはdrawableにグラデーションの設定をしていきます
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="270"
android:startColor="#ffffff"
android:endColor="#0000ff" />
</shape>
それぞれ説明していきます
android:angle="270"
アングル、つまりグラデーションをかける角度のことです
その角度を270度に設定することによって 上から下に向けてのグラデーションをかけることができます
グラデーションをかけたい方向を変えたいときは android:angle を調整しましょう
0(未設定)では左から右へ
90 で 下から上へ
180で 右から左へ のグラデーションになります
android:startColor="#ffffff"
ffffff は white
android:endColor="#0000ff"
0000ff は blue
カラーコードや色の名前は
WEB色見本 原色大辞典
より
今回はwhiteからblue になる設定をしました
そして先ほどのdrawableを グラデーションをかけたいbackgraundに設定すると
上から下にかけて白から青にグラデーションのかかったbackgroundを設定することできました