Why button gets bigger when the background is set in android

前端 未结 6 849
心在旅途
心在旅途 2021-02-18 16:15

I encountered a problem with the Button view when I set a background to it using the android:background attribute in xml. Before I set the background,

6条回答
  •  你的背包
    2021-02-18 17:02

    It's because you are using wrap content for widht and height.

    You have several options. Quick and simple way? Set the value of the buttons specifying a size in DP like:

    
        

提交回复
热议问题