ImageButton doesn't highlight on click with Transparent background

前端 未结 4 1783
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-05 00:00

I\'ve set up an ImageButton to be transparent, so the icon matches the backgrond panel like the Android ActionBar. This looks fine as I want it to.

However, when the

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-05 00:39

    Just to add on Fernandez good answer:

    If you want the effect to be Round and not rectangle use:

    android:background="?android:selectableItemBackgroundBorderless"    
    

    (*for V21 and up).

提交回复
热议问题