title: Android: Making the width and the height of a custom view equal
body: <p>I am using a custom view (CoordinateGridView) in XML like this:</p>
  
  <pre><code>&lt;com.android.catvehicle.CoordinateGridView
      android:id="@+id/coordinateGrid"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"/&gt;
  </code></pre>
  
  <p>I am trying to get the width of the CoordinateGridView to fill the entire width of the screen. The height should then match the width -- therefore, the custom view should always be drawn as a square.</p>
  
  <p>How do I do this?</p>