我是
this question的作者.
要解决此问题,我必须在片段中的视图膨胀之前调用WebView.enableSlowWholeDocumentDraw().在米哈伊尔·纳加诺夫回答的评论中,我看到你尝试了很多选择但不是这个.下面是我在使用WebView的片段的onCreateView()方法中使用的代码.
public View onCreateView(LayoutInflater inflater,ViewGroup parent,Bundle bundle){
//Enable the drawing of the whole document for Lollipop to get the whole WebView
if(Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP){
WebView.enableSlowWholeDocumentDraw();
}
View view = inflater.inflate(R.layout.my_layout,parent,false);
/* Rest of code */
}
真的没有其他的东西.如果这不起作用,那么它可能是一个错误,你应该按照Mikhail的建议进行报告.
希望这可以帮助 !