title: Set Top Margin Only in android?
body: <p>I am trying to set the top margin only pragmatically, i am doing this</p>
  
  <pre><code> TextView tv = (TextView)findViewById(R.id.my_text_view);
   LinearLayout.LayoutParams params = (LinearLayout.LayoutParams)tv.getLayoutParams();
   params.setMargins(0, 0, 10, 0); //substitute parameters for left, top, right, bottom
   tv.setLayoutParams(params);
  </code></pre>
  
  <p>now the issue is i've given some value of right margin left margin values in xml file, and by doing this through coding in java class it disturbs the xml values, is there any way to set the top margin only?</p>