当在布局中添加 WebView 时:ansCellLayout.addView(answerHtml, new LinearLayout.LayoutParams(100, 100));ansCellLayout 是 LinearLayout。WebView 会以100的高和100的宽创建。