【发布时间】:2020-05-18 00:02:28
【问题描述】:
我已将 TextView 旋转了 270 度。但问题是它从 x 轴的中点开始旋转,因此左右两边都有空间。并且由于空间的原因,文本不能在相对布局的左侧对齐。
这是我的代码
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="300dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:rotation="270"
android:text="Sept 2015 - Dec 2016"
/>
</RelativeLayout>
这是结果。
我想像这样对齐TextView
【问题讨论】:
-
只是一个建议:尝试将宽度更改为“12dp”之类的东西
-
它不能解决问题@KoushikShomChoudhury