我在这个表格中有一个表格布局,我定义了一个带有 4 个编辑文本的表格行作为列标题。
我的问题是我想将此静态行设为固定位置,因此当我向下滚动屏幕时,此行位置不会改变。
我从数据库动态加载其他行。
感谢您的帮助!
这是我的 xml 代码:
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/horizontalScrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background">
<ScrollView
android:id="@+id/scrollViewPhysicalExam"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TableLayout
android:id="@+id/TLArchiveHeader"
android:layout_height="wrap_content"
android:layout_width="match_parent">
<TableRow style="@style/HeaderRow">
<TextView
style="@style/HeaderText"
android:layout_width="200dp"
android:text="Owner name"/>
<TextView
style="@style/HeaderText"
android:layout_width="200dp"
android:text="Phone" />
<TextView
style="@style/HeaderText"
android:layout_width="200dp"
android:text="Address" />
<TextView
style="@style/HeaderText"
android:layout_width="200dp"
android:text="Mail" />
<TextView
style="@style/HeaderText"
android:layout_width="200dp"
android:text="Fax" />
</TableRow>
</TableLayout>
</LinearLayout>
</ScrollView>
</HorizontalScrollView>