Padding not working on ImageButton

后端 未结 3 1844
独厮守ぢ
独厮守ぢ 2020-12-13 17:03

In an app I am working on, I have several ImageButtons. Each ImageButton has a background and content in the form of a drawable. Right now the drawable is at maximum size wi

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-13 17:42

    The padding only has effect on the android:src attribute, not on the android:background.

    Set the first to your button image and the latter to android:background="@android:color/transparent"

提交回复
热议问题