title: Unable to size widgets properly
body: <p>In the app I am creating I have a screen manager that holds a few screen instances. In one of them I want to have 2 standard widgets, and a number of buttons that are added dynamically by the user. If those buttons are too many, the user should be able to scroll through them till he finds the one he wants.</p>
  
  <p>To accomplish that I use a grid layout that holds two objects: another grid layout and a scrollview. The grid layout is in charge of the 2 standard widgets(a text input and a button). The scrollview is in charge of the dynamically added buttons.</p>
  
  <p>I want the scrollview part to occupy the bigger part of the window (say 75%) so the user can see the buttons more clearly, and the gridlayout with the 2 standard widgets should occupy the remaining part. However, the gridlayout ends up taking the bigger part of the window for itself. </p>
  
  <p>Here's the piece of code (assume that the dynamically added buttons right now are 15):</p>
  
  <pre><code>sm = ScreenManager()
  
  class scr1(Screen):
      pass
  
  #layout that occupies the entire window. Everything else will be added on this
  glayout = GridLayout(cols=1)
  
  #layout that should occupy 25% of the window
  layout1 = GridLayout(cols=1,size_hint_y=0.25)
  
  #layout to be added on the scrollview 
  layout2 = GridLayout(cols=1,size_hint_y=None)
  layout2.bind(minimum_height=layout2.setter('height'))
  
  #screen to hold the glayout
  screen1 = scr1(name = '1')
  
  #adding a couple of widgets to layout1
  layout1.add_widget(Button(text = 'hey'))
  layout1.add_widget(TextInput(text = 'hey'))
  
  #scroller that should occupy 75% of the window
  scroller = ScrollView(size_hint = (1,None))
  scroller.add_widget(layout2)
  
  #adding buttons to be scrolled 
  for i in range(15):
      layout2.add_widget(Button(text=str(i),size_hint_y=None))
  
  #adding scroller and layout1 to glayout and then the glayout to the screen
  glayout.add_widget(scroller)
  glayout.add_widget(layout1)
  screen1.add_widget(glayout)
  
  #adding the screen to the screen manager
  sm.add_widget(screen1)    
  </code></pre>
  
  <p>I am not very familiar with the positioning system that kivy uses, and I am not sure how I should go about solving this problem. Here's what the program looks like when I run it.
  <a href="https://i.stack.imgur.com/6FHUE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6FHUE.png" alt="You can see that the first small part is the scrollview, and the rest is the gridlayout"></a></p>