我无法让GridLayout水平滚动.
我发现了一个类似的问题Gridlayout + ScrollView.我尝试了这种方法,但它没有用.
它会删除许多表(因为它应该显示从1到20的所有表).
这是xml文件
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:padding="16dp" >
android:id="@+id/table_mapGrid"
android:layout_width="250dp"
android:layout_height="wrap_content" />
android:id="@+id/table_errorView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="20dp"
android:text="@string/message_error_connection"
android:visibility="invisible" />
我希望显示动态内容,改变列和行的数量,可能在表之间有空格.
我已经完成了,但问题是当GridLayout的宽度变得大于其容器的宽度时,我想用水平滚动来解决它,但它似乎不起作用……
有什么建议吗?