如何在安卓中移除默认按钮样式

10
上面是我的按钮,我想要去掉默认的阴影,我已经成功地去掉了背景色,但是阴影仍然存在。以下是我的XML代码:
<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/create_account"
    android:id="@+id/buttonCreateAccount"
    android:layout_gravity="center_horizontal"
    android:background="@null"
    style=""
    android:shadowRadius="@null"
    android:drawableBottom="@null"
/>

use your own custom style - K Guru
1个回答

21

使用以下样式

style="?android:attr/borderlessButtonStyle" 

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接