我想在 listView 中展开不同长度的文本视图。这是我到目前为止得到的:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/dateTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginTop="5dp"
android:adjustViewBounds="true"
android:gravity="center_horizontal|center_vertical"
android:text="@string/empty_int"
android:textAppearance="?android:attr/textAppearanceMedium" />
<View
android:layout_width="2dp"
android:layout_height="match_parent"
android:layout_marginBottom="0dp"
android:layout_marginTop="0dp"
android:background="#EF6C00" >
</View>
我想要实现的布局是这样的:
date | time | score | distance | altitude
数字:
dd/mm/yyyy | hh:mm:ss | [0-1000] | [0-100] | [0-100]
10 spaces | 8 spaces | 4 spaces | 3 spaces | 3spaces
可悲的是,这就是它现在的样子: