在布局中有文本视图。我想以一定的角度(交叉)显示文本,而不是水平显示。有可能吗?
谢谢。
发布于 2013-04-13 19:04:18
使用Xml:
<TextView
...
android:rotation="45" />使用代码:
myTextView.setRotation(45f);对于API 10及更低版本,必须通过代码完成:
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);发布于 2013-04-13 19:05:05
这是一个与上一篇文章非常相似的问题。在这里查看被接受的答案:android text view text in vertical direction
如果不对textview类进行一些定制,我不认为有一种“简单”的方法可以做到这一点。
https://stackoverflow.com/questions/15987071
复制相似问题