开发者

Android - How to move together in two different tables HorizontalScrollViews?

I'm trying to do a kind of table, as a TableModel in java, dynamically inserting several TextViews, everything works right, but when I go to the last row, or any in the midle, of the table the header disappears leaving only the body of the table. I wish that it stays fixed on the table's top, only moves horizontally, according to the table, body, moves horizontally...

They are in separated tables and HorizontalViews....

I've tried everything and so far nothing....

Something like this开发者_开发问答, and in tableHeader and tableBody I insert rows with TextViews.


<?xml version="1.0" encoding="utf-8"?>  
<TableLayout...>
    <TableRow ...
        <HorizontalScrollView>
        <TableLayout android:id="@+id/tableHeader>
        </TableLayout>
    </HorizontalScrollView>
    <HorizontalScrollVie>
        <TableLayou android:id="@+id/tableBody>
        </TableLayout>
    </HorizontalScrollView>
</TableLayout>

thank you in advance


Maybe something like this?

<HorizontalScrollView>
<LinearLayout>
  <TextView .... (header) >
    <ScrollView>
      <TextView ... (cell) >
    </ScrollView>
</LinearLayout>
</HorizontalScrollView>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜