title: Setting margin to ImageView using float values
body: <p>I have an ImageView for which I want to pass float values as Top and Left margin. I have these 2 values to set as Top and Left margin.</p>
  
  <pre><code>float valTop = 3.5;
  float valueLeft = 6.8;
  </code></pre>
  
  <p>I have this code. But I have to roundup the margin values to int value.</p>
  
  <pre><code>RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); 
          params.leftMargin = Math.round(valLeft);
          params.topMargin = Math.round(valTop);
          imageView.setLayoutParams(params);
  </code></pre>
  
  <p>Is there any way to directly set float value as margin ?</p>