How to set Text for TextView so that it will appear from Top left through Code in Android not by XML.
Thanks in Advance?
How to set Text for TextView so that it will appear from Top left through Code in Android not by XML.
Thanks in Advance?
TextView text = new TextView(context);
text.setGravity(Gravity.LEFT|Gravity.TOP);
The class Gravity
belongs to the android.view
package.