title: How to change Button size in Android?
body: <p>I am trying to change the button size dynamically, but after using <code>setWidth()</code> and <code>setHeight()</code> nothing happens. </p>
  
  <p>This is my code...</p>
  
  <pre><code>GridLayout grid = (GridLayout)findViewById(R.id.grid);
  grid.setColumnCount(10);
  grid.setRowCount(10);
  cells = new Button[100];
  for (int i = 0; i &lt; cells.length; i++) { 
      cells[i] = new Button(this);
      cells[i].setWidth(grid.getWidth()/10);
      cells[i].setHeight(grid.getHeight()/10);
      grid.addView(cells[i]);
  }
  </code></pre>
  
  <p>Any ideas/solutions?</p>