Crosswalk的XWalkView(Webview的替代品)不能与AppBarLayout + CoordinatorLayout一起使用

HyB*_*RiD 15 android webview android-scrollview crosswalk-runtime android-coordinatorlayout

我想实现滚动Toolbar技术(隐藏Toolbar使用同级子视图上下滚动时)CoordinatorLayoutAppBarLayout.

我正在使用CrosswalkXWalkView(它是一个像WebView一样的视图).

使用常规WebView(在a内NestedScrollView)我可以实现想要的效果:

<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/app_bar_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            app:layout_scrollFlags="scroll|enterAlways" />

    </android.support.design.widget.AppBarLayout>

    <android.support.v4.widget.NestedScrollView
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <WebView
            android:id="@+id/webViewOrig"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>

    </android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>
Run Code Online (Sandbox Code Playgroud)

然而,当以XWalkView相同的方式使用时,我无法让它工作.使用以下XML布局后:

<android.support.v4.widget.NestedScrollView
        android:id="@+id/scrollView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport = "true"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <org.xwalk.core.XWalkView
            android:id="@+id/webViewCross"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>
</android.support.v4.widget.NestedScrollView>
Run Code Online (Sandbox Code Playgroud)

视图甚至没有出现.

删除以下行时

app:layout_behavior="@string/appbar_scrolling_view_behavior"
Run Code Online (Sandbox Code Playgroud)

XWalkView至少显示,但在整个屏幕上,并在工具栏的顶部.

我该怎么做才能让它发挥作用?因为它是一个开源我应该能够使它工作...我怀疑它是子类XWalkView并实现一些接口(NestedScrollingChild?)或通过子类CoordinatorLayout.Behavior或创建自定义行为AppBarLayout.ScrollingViewBehavior.

有任何想法吗?

BTW XWalkView在内部使用SurfaceViewTextureView来呈现Web内容.