Dynamic height of TextView within a GridLayout

后端 未结 2 392
北荒
北荒 2020-12-10 06:04

I have a problem using GridLayout using library compatibility (not tried without). I am using app:layout_gravity=\"fill_horizontal\" instead of android:la

2条回答
  •  情歌与酒
    2020-12-10 06:44

    You have to set layout_width="0dp" and layout_gravity="fill_horizontal" for the TextView.

    
    

    Please, see full example here: https://groups.google.com/d/msg/android-developers/OmH3VBwesOQ/ZOGR0SGvC3cJ or here: http://daniel-codes.blogspot.com/2012/01/gridlayout-view-clipping-issues.html

提交回复
热议问题