答案 0 :(得分:1)
老问题,但我偶然发现它并得到答案(或者至少我认为),我真的不知道这是否是最好的方法,但它应该可以胜任。
<Button
android:id="@+id/sign_in_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
这里的诀窍是@style/Widget.AppCompat.Button.Borderless.Colored
。另请参阅此答案,它解释了很多https://stackoverflow.com/a/36666660/1920068
答案 1 :(得分:0)
试试这个
android:background="@android:color/transparent"
答案 2 :(得分:0)
只需使用TextView,然后使用背景点击效果:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#23ac29"
android:text="Signup"
android:textSize="18sp"
android:padding="8dp"
android:background="?android:attr/selectableItemBackground"/>