GridLayout Column width

前端 未结 6 1983
再見小時候
再見小時候 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:20

    Ok, so I gave up on the grid view and just used a some linear layouts. I made a vertical one and then added 2 horizontals. It's slightly more involved than the grid view... but until I figure that out at least this works.

    
    
        
    
            
    
        
    
        
    
            
    
        
    
    
    

    And then i add this to make the buttons square :)

    @Override
     public void onWindowFocusChanged(boolean hasFocus) {
      super.onWindowFocusChanged(hasFocus);
    
      btnPrefs.setMinimumHeight(btnPrefs.getWidth());
      btnVerse.setMinimumHeight(btnMyButton.getWidth());
    
     }
    

提交回复
热议问题