Long text on button messes up GridLayout rows

前端 未结 2 898
伪装坚强ぢ
伪装坚强ぢ 2021-01-22 13:10

I have a GridLayout which is used to host a number of buttons, ordered in two columns. All the buttons have fixed height and width. If one of the buttons contains too much text,

相关标签:
2条回答
  • 2021-01-22 13:29

    You should place the button inside a linearLayout and set the sizes of your button to the linear layout. Inside the linear layout place your button as both width and height as fill parent. This way your view will not be messed up.

    0 讨论(0)
  • 2021-01-22 13:42

    you probably can do it by simply adding a maximum height to the buttons

    android:maxHeight="60dp"
    
    0 讨论(0)
提交回复
热议问题