您好,我需要一些帮助,如何在我的圆形按钮上添加阴影。这是我的代码
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="#e51c23" />
<corners
android:bottomLeftRadius="56dip"
android:bottomRightRadius="56dip"
android:topLeftRadius="56dip"
android:topRightRadius="56dip" />
</shape>
答案 0 :(得分:0)
试试这个......
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:left="5dp" android:top="5dp"> <!-- shadow effect -->
<shape>
<corners android:radius="10dp" />
<solid android:color="#888888" />
</shape>
</item>
<item android:bottom="3dp" android:right="3dp"> <!-- Button Shape -->
<shape android:shape="rectangle">
<solid android:color="#55fff000"/>
<corners android:radius="10dp" />
<padding android:left="10dp"
android:right="10dp"/>
<stroke android:width="3px"
android:color="@color/border_pink" />
</shape>
</item>
</layer-list>