title: android ImageView setPadding has no effect
body: <p>I am trying to set padding of an ImageView. My code is below</p>
  
  <pre><code>private void createEpisodeView() {
      float scale = this.getResources().getDisplayMetrics().density;
      int padding = (int) (PADDING * scale + 0.5f);
  
      rlItemsRoot = (LinearLayout) findViewById(R.id.rl_items_root);
  
      for (int i = 0; i &lt; GameLevels.TOTAL_EPISODES; i++) {
          ImageView iv = new ImageView(this);
  
          iv.setPadding(padding, padding, padding, padding);          
          iv.setBackgroundResource(R.drawable.icon_small);
  
          rlItemsRoot.addView(iv);
      }
  
  }
  </code></pre>
  
  <p>But it has no effect. but when I set this in XML it looks fine.</p>