title: ImageView getLayoutParams() returns null
body: <p>I'm creating a widget programicaly with this simple method</p>
  
  <pre><code>private ImageView getModuleIconView(Module module) {
      ImageView view = new ImageView(context);
      view.setImageResource(module.getIconResId());        
      view.getLayoutParams().height = 50; //NullPointerException
      return view;
  }
  </code></pre>
  
  <p>I get the NullPointer Exception because getLayoutParams returns null. Why is that?</p>