How to have a transparent ImageButton: Android

后端 未结 19 1942
庸人自扰
庸人自扰 2020-11-27 08:56


        
19条回答
  •  感情败类
    2020-11-27 09:20

    Setting the background to "@null" will make the button have no effect when clicked. This will be a better choice.

    style="?android:attr/borderlessButtonStyle"
    

    Later I found that using

    android:background="?android:attr/selectableItemBackground"
    

    is also a good solution. And you can inherit this attribute in your own style.

提交回复
热议问题