android nestedscrollview webview,android – CoordinatorLayout / NestedScrollView /隐藏 – 显示工具栏/ WebView...

我有一个问题:

<?xml version="1.0" encoding="utf-8"?>

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:id="@+id/appBarLayout"

android:layout_width="match_parent"

android:layout_height="wrap_content">

android:id="@+id/toolbar"

android:layout_width="match_parent"

android:layout_height="?attr/actionBarSize"

android:background="?attr/colorPrimary"

app:layout_scrollFlags="scroll|enterAlways" />

android:layout_width="match_parent"

android:layout_height="match_parent"

app:layout_behavior="@string/appbar_scrolling_view_behavior">

android:id="@+id/webView"

android:layout_width="match_parent"

android:layout_height="match_parent" />

当我在网页视图中滚动时,工具栏被隐藏或显示(完美!),但是加载/定位网页有问题.

例如,如果我滚动到一个页面的中间,我点击一个链接,新的页面,将加载也位于大约中间的页面,而不是在顶部.好像滚动条没有从一个页面移动到另一个页面.

如果我添加到NestedScrollView:

android:fillViewport="true"

一切都与webview一起工作(页面加载,看起来很好,虽然从顶部开始),但我失去了隐藏/显示与工具栏:(

你有什么想法吗?

预先感谢您的帮助 :)

(有关信息:Android设计支持库:23.0.1)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值