我想要一个圆圈碎片。我搜索了一下,发现我应该创建一个圆形视图。现在我已经创建了一个视图。如果可以这样做,我如何将片段添加到视图中?如果不可能,请帮助创建圆片段。
发布于 2016-08-27 16:47:34
circle.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" >
<gradient android:startColor="@color/yourColor" android:endColor="@color/yourColor"
android:angle="270"/>
</shape>
在片段视图中
<LinearLayout android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/circle"/>
https://stackoverflow.com/questions/39178692
复制相似问题