Android:允许使用adjustPan滚动表单

Android:允许使用adjustPan滚动表单,android,layout,scroll,Android,Layout,Scroll,我正在开发一款布局稍微复杂的Android应用程序,我正在做噩梦,让它按照我想要的方式工作。 我的主布局定义如下: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_pa

我正在开发一款布局稍微复杂的Android应用程序,我正在做噩梦,让它按照我想要的方式工作。 我的主布局定义如下:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
tools:context=".MainLayout" >

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <RelativeLayout
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:scrollbars="none" />

    <LinearLayout
        android:id="@+id/menudown"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" >

        ... buttons ...

    </LinearLayout>
</LinearLayout>

<LinearLayout
    android:id="@+id/header"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_centerInParent="true" >

    ... header content ...
</LinearLayout>    

</RelativeLayout>

... 按钮。。。
... 标题内容。。。
布局的思想是有一个内容框(content)、一个页脚菜单(menudown)和一个页眉(header)悬停在内容上方,与屏幕顶部对齐。-抱歉,伙计们,没有图像,机密项目

根据用户所在区域的不同,内容会使用其他布局进行膨胀,其中一些布局是要填写的表单。所以,我只用了调节盘,一切都很好

这里的问题是:客户要求我在显示软键盘时使内容可滚动,以便用户可以查看他在其他字段上写的任何内容

这很痛苦,因为:表单适合屏幕,所以使用内容作为滚动视图不会有帮助,除非它调整了大小

而仅仅更改为adjustResize是不起作用的,因为:菜单会随着软键盘一起出现,而软键盘不应该出现。而且,视觉效果也很糟糕


该应用程序已经为iPad制作(由其他人制作),而他所做的是:菜单仍与屏幕底部对齐,在软键盘下,只向上推内容视图。然后,内容变成可滚动的,这样用户就可以完全看到它。

我也有同样的问题,使键盘的行为与在iOS上一样。从所有其他帖子中我能得到的最好的东西就是手动检测软键盘并将视图向上移动

这似乎是最好的: