How to have a transparent ImageButton: Android

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


        
19条回答
  •  隐瞒了意图╮
    2020-11-27 09:38

    DON'T USE A TRANSAPENT OR NULL LAYOUT because then the button (or the generic view) will no more highlight at click!!!

    I had the same problem and finally I found the correct attribute from Android API to solve the problem. It can apply to any view.

    Use this in the button specifications:

    android:background="?android:selectableItemBackground"
    

提交回复
热议问题