【问题标题】:About WebView In NestedScrollView. Can not show bottom content关于 NestedScrollView 中的 WebView。无法显示底部内容
【发布时间】:2016-04-22 09:35:30
【问题描述】:

使用 NestedScrollView 无法显示 webview 底部内容的情况。 底部栏不是应用栏。

对不起我的英语。谢谢~

依赖

compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.android.support:design:23.3.0'

我的代码

<android.support.design.widget.CoordinatorLayout 
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <include layout="@layout/view_toobar" />

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

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

            <WebView
                android:id="@+id/web_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent"></WebView>
        </android.support.v4.widget.NestedScrollView>
    </android.support.v4.widget.SwipeRefreshLayout>

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

【问题讨论】:

    标签: android webview nestedscrollview


    【解决方案1】:

    您应该更多地阅读 Material 小部件,因为您在 NewstedScrollView 中使用了一些新参数。该参数为下方的滚动空间,来自 ActionBar 的大小。只需将其删除,或更新您的代码!

    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    

    【讨论】:

    • 我试过这段代码,也不能消失。
    • 我认为是 NestedScrollView 自动增加高度,所以我的网站浮动菜单无法在屏幕上显示。但实际上,它显示在网站页脚上。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多