title: ImageView be a square with dynamic width?
body: <p>I have a GridView with ImageViews inside. I have 3 of them for each row. I can set correctly the width with WRAP_CONTENT and scaleType = CENTER_CROP, but I don't know how to set the ImageView's size to be a square. Here's what I did until now, it seems to be ok except the height, that is "static":</p>
  
  <pre><code>imageView = new ImageView(context);     
  imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
  imageView.setLayoutParams(new GridView.LayoutParams(GridView.LayoutParams.WRAP_CONTENT, 300));
  </code></pre>
  
  <p>I'm doing it inside an adapter.</p>