Ran*_*see 2 android android-drawable android-shape
我有一个线性布局视图,其背景我已设置为椭圆形纯色.到目前为止,我的背景是圆圈.现在我想实现相同的,即使用形状drawable得到一个2种颜色的圆.请参照附件.
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<gradient
android:centerX="-1"
android:type="sweep"
android:startColor="color1"
android:endColor="color2"
/>
</shape>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1631 次 |
| 最近记录: |