【发布时间】:2018-02-04 19:30:08
【问题描述】:
我尝试通过使用带有 TableRow 的 TableLayout 和 TextView 来为我的学校制作一个时间表应用程序。问题是当我输入更长的文本时,TextView 会向下移动。 这是我的xml: `
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:layout_width="0dp"
android:layout_height="60dp"
android:text="Mo"
android:background="#ffffff"
android:gravity="center"
android:layout_margin="1dp"/>
<TextView
android:layout_width="0dp"
android:layout_height="60dp"
android:gravity="center"
android:text="Tu"
android:background="#ffffff"
android:layout_margin="1dp"/>
<TextView
android:layout_width="0dp"
android:layout_height="60dp"
android:text="WeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWeWe"
android:gravity="center"
android:background="#ffffff"
android:layout_margin="1dp"
/>
</TableRow>
</TableLayout>`
【问题讨论】:
标签: android android-layout textview tablelayout tablerow