title: Android: Set minimum height of a view programmatically
body: <p>I'm trying to set minimum height for an imageview programmatically but had no luck so far. My code is below</p>
  
  <pre><code>    int width = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 160, getResources().getDisplayMetrics());
      int minHeight = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 100, getResources().getDisplayMetrics());
  
      LayoutParams params = new LayoutParams(width,LayoutParams.MATCH_PARENT);
  
      SmartImageView siv = new SmartImageView(getActivity());
      siv.setMinimumHeight(minHeight);
      siv.setLayoutParams(sivParams);
      siv.setAdjustViewBounds(true);
      siv.setScaleType(ScaleType.FIT_XY);
      siv.setImageUrl(url);
      ll.addView(siv);
  </code></pre>
  
  <p>I also tried to put the setMinimumWidth method after the setLayoutParams method but that didn't worked either. Please help</p>
  
  <p>Thanks</p>