请问各位那个已签到的按钮是怎么做出来的(背景透明但是外围有一圈不透明的环绕线)。
用 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>
15 回答8.4k 阅读
8 回答6.2k 阅读
1 回答4k 阅读✓ 已解决
3 回答6k 阅读
3 回答2.2k 阅读✓ 已解决
2 回答3.1k 阅读
2 回答3.8k 阅读
已经解决了可以通过设置背景shape图片来解决 shape代码如下
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
</corners>
<stroke
</stroke>
</shape>