旋转屏幕时活动不滚动

Ret*_*eto 5 android

当我转动手机并且屏幕旋转时,我再也看不到整个屏幕了.这没关系,但我无法滚动!我是否需要为滚动设置一些标志或属性?这是我的xml的一部分......

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:layout_width="fill_parent" android:layout_height="fill_parent" >
    <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="*">
        ...
    </TableLayout>
    <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" 
        ...
    </TableLayout>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

谢谢!

Yas*_*mar 6

您必须将完整的布局放在a ScrollView中才能滚动.

如果您的布局高度超过屏幕高度,它会滚动,这通常在横向模式下发生.

在你的情况下放在LinearLayout里面ScrollView,因为ScrollView只能有1个孩子.