GridLayout Column width

前端 未结 6 2009
再見小時候
再見小時候 2021-02-11 12:27

I have 2 columns in my GridLayout. What I want to do is make those columns take up half of the width of the screen each and then have its child contents fill their

6条回答
  •  故里飘歌
    2021-02-11 13:06

    This code is available on pre API21 with support library!

    I have a simple piece of code to show 4 buttons in a gridLayout of 2 columns that take 50% of the available space: perhaps it can help

    
    
    
        

    Solution is perhaps this :

    android:layout_gravity="fill"
    android:layout_columnWeight="1"
    

提交回复
热议问题