android 常用渐变背景绘制
生活随笔
收集整理的這篇文章主要介紹了
android 常用渐变背景绘制
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
從上到下繪制如圖所示
??????
1 <?xml version="1.0" encoding="utf-8"?> 2 <shape xmlns:android="http://schemas.android.com/apk/res/android" 3 android:shape="rectangle"> 4 <gradient 5 android:angle="270" 6 android:endColor="#20a7ea" 7 android:startColor="#4adcf9" /> 8 </shape>從左到右繪制漸變色如圖所示
?
????
?
1 <?xml version="1.0" encoding="utf-8"?> 2 <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> 3 <gradient android:startColor="#F8CE64" android:endColor="#FCAD79"/> 4 <corners android:radius="24dp" /> 5 6 <corners 7 android:bottomLeftRadius="20dip" 8 android:bottomRightRadius="20dip" 9 android:topLeftRadius="0dip" 10 android:topRightRadius="0dip" /> 11 12 </shape>?
轉載于:https://www.cnblogs.com/monkey0928/p/9258629.html
總結
以上是生活随笔為你收集整理的android 常用渐变背景绘制的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: IDEA创建多个模块MavenSprin
- 下一篇: 属性,类方法,静态方法,反射