您的位置:首页 > 移动开发 > Android开发

Android之简单背景颜色渐变实现

2018-01-29 19:49 525 查看

1、问题

需要实现简单颜色渐变背景





2、xml文件实现

1)、bg.xml文件
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >

<gradient
android:startColor="#1E90FF"
android:centerColor="#00EEEE"
android:endColor="#00B2EE"
android:angle="270"
/>
<corners android:radius="0dip" />
</shape>
2)、使用
android:background="@drawable/gb"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: