app直播源码,xml实现由上而下的颜色渐变(App live source code, XML to achieve top-down color gradient)

app直播源码,xml实现由上而下的颜色渐变

 drawble文件夹下面新建,xxx.xml内容如下

<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"    android:shape="rectangle">    <gradient        android:angle="200"        android:centerColor="#EBFDEF"        android:endColor="#EBFDEF"        android:startColor="#A3FCB5" />    <corners android:radius="30dp" /></shape>

以上就是app直播源码,xml实现由上而下的颜色渐变, 更多内容欢迎关注之后的文章

————————

App live source code, XML to achieve top-down color gradient

Create a new file under the drawable folder, XXX The XML content is as follows

<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"    android:shape="rectangle">    <gradient        android:angle="200"        android:centerColor="#EBFDEF"        android:endColor="#EBFDEF"        android:startColor="#A3FCB5" />    <corners android:radius="30dp" /></shape>

The above is the app live broadcast source code. XML realizes the color gradient from top to bottom. For more content, please pay attention to the following articles