wrap_content is not working in button height android

前端 未结 6 979
灰色年华
灰色年华 2020-12-31 01:40

\"wrap_content\" is not working in my button, it currently looks like this:

 now                        want
 ____________
|            |           _________         


        
6条回答
  •  悲&欢浪女
    2020-12-31 02:36

    One solution is to add android:padding="@null" to the button in your XML. This will override any existing padding being enforced.

    There is also an issue I've come across where a button will not shrink smaller than the padding defined in the default button style. I highlighted this in my own question some time ago but haven't had an answer that resolves it yet.

提交回复
热议问题