如何讓W(xué)ebView中網(wǎng)頁內(nèi)容填充整個頁面
1 回答

Smart貓小萌
TA貢獻1911條經(jīng)驗 獲得超7個贊
1、確定你的xml布局寬高都是android:layout_width="match_parent" android:layout_height="match_parent"
2、webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); // 設(shè)置無邊框
WebSettings settings = webView.getSettings(); // 獲取webView的設(shè)置對象
settings.setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN); // web內(nèi)容強制滿屏
3、如果還是沒有滿屏,那你把webView設(shè)置一下邊框,看看是不是html界面的問題.
- 1 回答
- 0 關(guān)注
- 837 瀏覽
添加回答
舉報
0/150
提交
取消