GridLayout Column width

前端 未结 3 2067
伪装坚强ぢ
伪装坚强ぢ 2021-02-11 12:56

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

3条回答
  •  独厮守ぢ
    2021-02-11 13:25

    For pre API 21, use support library:

    add

    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    

    to your dependencies.

    Then in your xml file:

    
    
                        
    
                        
    
    
    

    Here note the use of "app" prefix and dont forget to add

    xmlns:app="http://schemas.android.com/apk/res-auto"
    

    to your xml file

提交回复
热议问题