Nikki, just add the marginLeft attribute to your TextView, for example:
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text="Testing"
/>
where you simply substitute whatever value you want for the left margin.
EDIT: for code, you should be able to use the following:
TextView tv = new TextView(this);
LayoutParams lp = new LayoutParams(
LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT);
lp.setMargins(left, top, right, bottom);
tv.setLayoutParams(lp);
And damn it, here's how to do it in one line :)
TextView tv = new TextView(this).setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT).setMargins(left, top, right, bottom));