In layout there is textview. And i want to show the text in some angle(in cross) instead of horizontal. Is it possible?
Thank you.
Using Xml:
<TextView
...
android:rotation="45" />
Using Code:
myTextView.setRotation(45f);
For API 10 and below, must be done through code:
RotateAnimation animation = new RotateAnimation(45f, 45f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
animation.setInterpolator(new LinearInterpolator());
animation.setDuration(1);
animation.setFillAfter(true);
myTextView.startAnimation(animation);
This is a very similar question to a previous post. Check out the accepted answer here: android text view text in vertical direction
I don't believe there's an "easy" way to do it without some customization of the textview class.