我终于通过权重属性解决了我上一个帖子的问题,但是当我最后给出多行文本时出现了一个问题 Textview not show which in this url http://imgur.com/ApL5c
如何在我的代码中添加滚动视图?
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="1"
android:weightSum="11"
android:layout_margin="5dp">
<TableRow>
<TextView
style="@style/StyleLabel"
android:text="@string/name_lbl"/>
<TextView
android:id="@+id/nameText"
android:layout_weight="2"
style="@style/StyleText"/>
</TableRow>
<TableRow>
<TextView
style="@style/StyleLabel"
android:text="@string/cap_lbl"/>
<TextView
android:id="@+id/capText"
android:layout_weight="2"
style="@style/StyleText"/>
</TableRow>
<TableRow>
<TextView
style="@style/StyleLabel"
android:text="@string/code_lbl"/>
<TextView
android:id="@+id/codeText"
android:layout_weight="1"
style="@style/StyleText"/>
</TableRow>
<TableRow>
<TextView
style="@style/StyleLabel"
android:text="@string/DoneDate_lbl"/>
<TextView
android:id="@+id/Location_lbl"
android:layout_weight="1"
style="@style/StyleText"/>
</TableRow>
<TableRow>
<TextView
style="@style/StyleLabel"
android:text="@string/Notes_lbl"/>
<TextView
android:id="@+id/Notes_lbl"
android:layout_weight="4"
style="@style/StyleText"
/>
</TableRow>
<TableRow>
<TextView
style="@style/StyleLabel"
android:text="@string/person_lbl"/>
<TextView
android:id="@+id/Person_lbl"
android:layout_weight="1"
style="@style/StyleText"/>
</TableRow>