私はそれに問題があります:
<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/coordinatorLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <android.support.design.widget.AppBarLayout
        android:id="@+id/appBarLayout"
        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"
            android:background="?attr/colorPrimary"
            app:layout_scrollFlags="scroll|enterAlways" />
    </android.support.design.widget.AppBarLayout>
    <android.support.v4.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">
        <WebView
            android:id="@+id/webView"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>
Web ビューでスクロールすると、ツールバーが非表示または表示されます (完璧です!) が、Web ページの読み込み/配置に問題があります。たとえば、ページの中央までスクロールしてリンクをクリックすると、読み込まれる新しいページもページの上部ではなくほぼ中央に配置されます。スクロールバーがあるページから別のページに移動していないかのように。
NestedScrollView に追加すると:
android:fillViewport="true"
すべてがwebviewで機能します(ページは上から読み込まれますが、うまく表示されます)が、ツールバーで非表示/表示を失います:(
この問題について何か考えはありますか?
よろしくお願いします:)
(参考: Android Design Support Library : 23.0.1)
ヨップ