我有一个 ShapeDrawable 。我想以编程方式设置 CornerRadius (TopLeftRadius & BottomLeftRadius)。
下面是我的xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:top="5dp"
android:bottom="5dp">
<shape android:shape="rectangle">
<corners android:topLeftRadius="20dp"
android:bottomLeftRadius="20dp"/>
<solid android:color="#A2D368"/>
</shape>
</item>
</layer-list>