How to Change Margin of TextView
<p>I have TextView added Programmatically in to LinearLayout and on some external events I want to decrease bottom margin of that TextView to -10, for that I tried following. </p>

<pre><code>LinearLayout.LayoutParams lastTxtParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
lastTxtParams.setMargins(0, 0, 0, -10);
mOldTextView.setLayoutParams(lastTxtParams);
mOldTextView.invalidate();
</code></pre>

<p>Is the right way of modifying Margin of widget that has been added to View?<br>
Some how it is not working.</p>

<p>Thanks,<br>
PP.</p>
