title: How to position the view with margin that will look same for all devices?
body: <p>I'm trying to position a view in the center to make it look good by adding 130 (margin-top) programmatically, however, I'm not sure how to give other android devices such as tablets to look the same? adding 130 to the margin-top looks good on the normal android phone but will look different on a tablet. How will I able to make a logic to give a margin-top that will provide the same look on all devices? Some examples or tip would be great! I would love to hear from you! </p>
  
  <pre><code>margin_top = 130 // How to make this look good on all devices? 
  
  ViewGroup.MarginLayoutParams p = (ViewGroup.MarginLayoutParams) v.getLayoutParams();
  p.setMargins(0, margin_top, 0, 0);
  v.requestLayout();
  </code></pre>