Android 带框架布局的滚动视图

Android 带框架布局的滚动视图,android,scrollview,android-framelayout,Android,Scrollview,Android Framelayout,我正在尝试使用ScrollFromScrollView来展开、折叠我的标题。我无法使用新的支持库,因为该项目没有使用最新的SDK编译,我正在手动执行。如果我在WebView或其他布局中使用它,它可以工作,但在FrameLayout中则不能。我正在使用该框架加载Cordova内容,并尝试了许多解决方案,如添加最小高度、设置视口、将框架添加到另一个布局中 基本的xml代码是: <RelativeLayout xmlns:android="http://schemas.android.com/a

我正在尝试使用ScrollFromScrollView来展开、折叠我的标题。我无法使用新的支持库,因为该项目没有使用最新的SDK编译,我正在手动执行。如果我在WebView或其他布局中使用它,它可以工作,但在FrameLayout中则不能。我正在使用该框架加载Cordova内容,并尝试了许多解决方案,如添加最小高度、设置视口、将框架添加到另一个布局中

基本的xml代码是:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:id="@+id/containerIselling"
    android:layout_height="match_parent">

    <ScrollViewExt
        android:id="@+id/scroll"
        android:scrollbars="none"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

            <FrameLayout
                android:id="@+id/frameCordova"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginTop="220dp"/>
    </ScrollViewExt>
    <RelativeLayout
         android:id="@+id/header"
         android:layout_width="match_parent"
         android:layout_height="220dp">
             //Here header content
    </RelativeLayout>
</RelativeLayout>

//这里是标题内容
要折叠/展开标题,我会得到滚动值,并使用它们使标题变大或变小


根据我的布局,框架与父级不匹配,也没有使用ScrollView中的滚动,它使用Cordova的WebView的滚动,我可以让ScrollView事件接触到框架外部,但没有要滚动的内容,也没有按预期工作

小提示:在ScrollView中,您不能用
的“匹配父项”
定义子项,因为总是使用ScrollView的大小!但是您可以添加任何带有前缀大小的布局(例如
layout\u height:“1000dp”
),或者通过代码动态添加,如
ListView

好的,我试过了,但仍然不起作用。我已将高度设置为1000dp,但没有增加任何内容。在哪里设置高度?我将其设置为FrameLayout,并尝试通过编程将其设置为Cordova WebView尝试将“wrap_content”设置为scrollview仍然是同一个问题,框架的高度没有增加,并且没有使用scrollview