title: Android gridlayout overflowing screen
body: <p>I have this code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:columnCount="8"
      android:rowCount="8" &gt;
  
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
      &lt;ImageButton 
          android:src="@android:drawable/ic_menu_rotate"
          android:contentDescription="@null" /&gt;
  
  &lt;/GridLayout&gt;
  </code></pre>
  
  <p>And its giving me this:</p>
  
  <p><img src="https://i.stack.imgur.com/RcRua.jpg" alt="enter image description here"></p>
  
  <p>Its supposed to be an 8x8 grid but it's overflowing. How can I, non-programmatically, (through xml) fit the 64 squares?</p>