在我的应用我有按钮,它看起来像这样:如何使按钮看起来像一个列表
我想让他们看起来像这样:
我background.xml
如下:
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/solid" />
<item android:drawable="@drawable/shape" />
</layer-list>
solid.xml
如下:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ababab" />
</shape>
而且shape.xml
如下:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffff" />
<stroke android:width="3dp" color="#ff000000" />
<corners android:radius="15dp" />
<padding
android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />
</shape>
我怎样才能获得按钮所需的外观?
非常感谢你。 –