Android 嵌套ScrollView中带有锚定的Webview
我有一个嵌套的ScrollView,里面有一个WebView。WebView包含一个带有锚定的HTML文件,这些锚定链接到同一个文件但位置不同(想象一下“菜单”和“内容”容器。当您单击菜单项时,“内容”中的相应部分应显示在屏幕上)Android 嵌套ScrollView中带有锚定的Webview,android,html,webview,android-nestedscrollview,Android,Html,Webview,Android Nestedscrollview,我有一个嵌套的ScrollView,里面有一个WebView。WebView包含一个带有锚定的HTML文件,这些锚定链接到同一个文件但位置不同(想象一下“菜单”和“内容”容器。当您单击菜单项时,“内容”中的相应部分应显示在屏幕上) 问题是这些锚定无法按预期工作。您是否找到了解决方案?没有,抱歉。但当时是3岁。以前。你有没有找到解决办法?没有,对不起。但当时是3岁。以前 <android.support.v4.widget.NestedScrollView xmlns:android="ht
问题是这些锚定无法按预期工作。您是否找到了解决方案?没有,抱歉。但当时是3岁。以前。你有没有找到解决办法?没有,对不起。但当时是3岁。以前
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:id="@+id/svNested"
android:layout_height="match_parent"
tools:showIn="@layout/activity_single"
android:background="@color/colorPrimary">
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</android.support.v4.widget.NestedScrollView>
webView?.loadDataWithBaseURL(null, htmlContent, "text/html", "UTF-8", null)