【发布时间】:2019-04-03 16:26:18
【问题描述】:
我正在从字符串加载数据,当我第一次向下滚动时,webview 会闪烁几次。
这是我加载数据的代码:
webview.loadDataWithBaseURL(null, message.getmContent(), "text/html", "UTF-8", null);
还有xml:
<WebView
android:id="@+id/web_content"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@+id/footer"
android:layout_below="@id/message_title"
android:layout_margin="4dp"
/>
【问题讨论】:
-
你把你的网页视图放在滚动视图里面了吗?如果是,请尝试删除滚动视图。
-
试试 android:focus=false
-
然后设置 android:scrollingCache="false"