下拉刷新以向WebView添加额外的填充

时间:2019-07-15 22:36:00

标签: java android android-studio

我使用以下代码在我的应用程序中实现了下拉式刷新到WebView,但它为我加载的页面添加了一些额外的填充。 我正在动态创建WebView并将其添加到FrameLayout

代码如下:

<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
                        android:id="@+id/swipeContainerMain"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        app:layout_behavior="@string/appbar_scrolling_view_behavior">

                        <androidx.core.widget.NestedScrollView
                            android:fillViewport="true"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent">

                            <FrameLayout
                                android:id="@+id/contentFrame"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_alignParentStart="true"
                                android:layout_alignParentLeft="true" />

                        </androidx.core.widget.NestedScrollView>
                    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

这是加载页面后显示的内容。而且我想我可以向下滚动到无穷大。

enter image description here

如果有人可以帮助我。

谢谢

1 个答案:

答案 0 :(得分:0)

您可以将用于将WebView插入框架布局的代码吗?