Android中tablelayout横向滑动怎么实现
lewis
2019-04-06
25次阅读
要在Android中实现TableLayout的横向滑动,可以使用HorizontalScrollView来包裹TableLayout。以下是一个示例代码:
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TableLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!-- 在这里添加TableLayout的内容 -->
</TableLayout>
</HorizontalScrollView>
这样,TableLayout就会被包裹在一个横向滑动的容器中,当TableLayout的内容超出屏幕宽度时,用户就可以通过水平滑动来查看所有内容。

发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。