`
freedomray
  • 浏览: 33143 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

使用shape gradient创建具有渐变效果的线条

 
阅读更多

 

<?xml version="1.0" encoding="utf-8"?>
<shape
  xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient 
    	android:startColor="#0f00"
    	android:endColor="#ff00"
    />
</shape>






 

 

<?xml version="1.0" encoding="utf-8"?>
<shape
  xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient 
    	android:startColor="#0f00"
    	android:centerColor="#ff00"
    	android:endColor="#0f00"
    />
</shape>
 

 


 

 

 

 

<?xml version="1.0" encoding="utf-8"?>
<shape
  xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient 
    	android:startColor="#0f00"
    	android:endColor="#0f00"
    	android:type="radial"
    	android:gradientRadius="50%"
    />
</shape>
 

 




 

  • 大小: 7.1 KB
  • 大小: 9.8 KB
  • 大小: 10.2 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics