【发布时间】:2018-04-05 23:31:02
【问题描述】:
当方向为横向时,是否可以使用 android 模拟器滚动?如果是,那我一定是错过了什么……请帮帮我……谢谢
<?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" >
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TableLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="|"
android:layout_marginBottom="25dp">
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/tableRow1">
.....
</TableRow>
</TableLayout>
</LinearLayout>
</ScrollView>
【问题讨论】:
-
是的,绝对可以在模拟器和设备上双向滚动
-
Yes 滚动应该可以在模拟器中运行,并且您的代码看起来还可以。在某些设备(旧)中,
Scrollview不允许作为父布局,因此请尝试添加LinearLayout作为 xml 的父布局。