tags:

views:

22

answers:

1

How to set Text for TextView so that it will appear from Top left through Code in Android not by XML.

Thanks in Advance?

+2  A: 
TextView text = new TextView(context);
text.setGravity(Gravity.LEFT|Gravity.TOP);

The class Gravity belongs to the android.view package.

Cristian