java - 按钮效果实现方法?
PHP中文网
PHP中文网 2017-04-18 10:53:30
0
2
488

请问各位那个已签到的按钮是怎么做出来的(背景透明但是外围有一圈不透明的环绕线)。

PHP中文网
PHP中文网

认证高级PHP讲师

Antworte allen(2)
迷茫

已经解决了可以通过设置背景shape图片来解决 shape代码如下
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"

android:shape="rectangle">
<corners

android:topLeftRadius="100dp"
android:topRightRadius="100dp"
android:bottomRightRadius="100dp"
android:bottomLeftRadius="100dp">

</corners>
<stroke

android:width="3dp"
android:color="#bebebe">

</stroke>
</shape>

Ty80

用 shape 画

<?xml version="1.0" encoding="utf-8"?>
<shape
    android:shape="rectangle"
    xmlns:android="http://schemas.android.com/apk/res/android">

    <solid
        android:color="@android:color/transparent"/>
    <stroke
        android:color="@android:color/darker_gray"
        android:width="1dp"/>
    <corners
        android:radius="20dp"/>
</shape>
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!