我想设置圆圈大小,但我不想调整图层列表中其他元素的大小。 我有这段代码:
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/drawer_color" />
</shape>
</item>
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<gradient
android:endColor="#1b2727"
android:centerColor="#1a2a29"
android:startColor="#154440"
android:type="linear"
android:angle="90"/>
<size
android:height="600dp"
android:width="600dp" />
<stroke
android:width="3dip"
android:color="@color/drawer_ring_color" />
</shape>
</item>
</layer-list>
该怎么做? 谢谢!
最佳答案
不幸的是,这不会以这种方式工作,您的可绘制对象将采用您使用该可绘制对象的 View 的大小。
关于android - 如何只设置圆圈大小(在xml中)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46024341/