我有一个要滚动的表格视图,因为数据未显示完整。
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns="0,1,2,3,4"
android:id="@+id/maintable" >
</TableLayout>
这是我的表格布局,如果我将它包装在<ScrollView> </Scrollview>
如果我打开活动,应用程序就会崩溃。怎么做?
您确实应该输入您尝试过的导致应用程序崩溃的代码以及崩溃的原因。您的原始帖子中没有任何有价值的信息。
呃...你尝试过这么简单的事情吗?我在几个地方使用的示例 .xml:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableLayout android:id="@+id/score_table"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableRow android:id="@+id/header"/>
</TableLayout>
</ScrollView>
对我来说绝对没问题。显然,如果您不需要 TableRow,则不必包含它。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)