Possible Duplicate:
Vertical (rotated) label in Android.
How to make a TextView Text vertical
Have can I arrange vertically the text of the TextView.Just like the follow picture,sorry,I am no allow to posting my image!
Possible Duplicate:
Vertical (rotated) label in Android.
How to make a TextView Text vertical
Have can I arrange vertically the text of the TextView.Just like the follow picture,sorry,I am no allow to posting my image!
<TextView
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:text="a\nn\nd\nr\no\ni\nd" />
Try this. put \n after each character.
You can override setText method of the TextView, and can insert \n between each character. As following example:
public void setText(CharSequence str)
{
StringBuffer buffer=new StringBuffer();
for(int i=0; i<str.length(); i++)
{
buffer.append(str.charAt(i));
buffer.append("\n");
}
buffer.setLength(buffer.length()-1);
super.setText(buffer.toString());
}
solution given by others are absolutely perfect but there is a other way
<TextView
android:layout_width="2sp" /* width of one character width*/
android:layout_height="fill_parent"
android:text="a\nn\nd\nr\no\ni\nd"
android:singleLine="false"
/>