How to remove ImageButton's standard background image?

前端 未结 10 1343
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-13 01:50

In ImageButton I want to remove the standard button background image. In http://developer.android.com it is said, that one must define his\\her own background i

相关标签:
10条回答
  • 2020-12-13 02:15

    The best choice is not set a transparent background to your ImageButton.

    Give to your user a feedback when the button is tapped.

    android:background="?attr/selectableItemBackgroundBorderless"
    
    0 讨论(0)
  • 2020-12-13 02:15

    ImageButton.setBackgroundResource(0)

    0 讨论(0)
  • 2020-12-13 02:16

    Use:

    android:background="@null"
    

    in your layout xml.

    0 讨论(0)
  • 2020-12-13 02:16
    YourImageButton.setBackgroundColor(Color.TRANSPARENT);
    
    0 讨论(0)
提交回复
热议问题