I am trying to create a basic datasheet in my application using a TableLayout. The first row contains the titles of each column. Every row thereafter is data. I would like the data to be scrollable while keeping the first title row visible (i.e. the first row would not scroll with the rest).
I have tried something like the following (unsuccessfully):
<TableLayout>
<TableRow>
<!-- The headers -->
<TextView android:text="Header #1"/>
<TextView android:text="Header #2"/>
<TextView android:text="Header #3"/>
</TableRow>
<ScrollView>
<!--The rest of the data -->
<TableRow>
<TableRow>
...
</ScrollView>
</TableLayout>
This causes the program to crash. Any other suggestions?