3 回答

TA貢獻(xiàn)1828條經(jīng)驗(yàn) 獲得超3個(gè)贊
就是下面幾句代碼:
contentWeb = (WebView) findViewById(R.id.notice_content_content);
WebSettings webSettings= contentWeb.getSettings(); // webView: 類WebView的實(shí)例
webSettings.setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN); //設(shè)置自適應(yīng)

TA貢獻(xiàn)1831條經(jīng)驗(yàn) 獲得超4個(gè)贊
WebSettings ws = tv.getSettings();
//html的圖片就會(huì)以單列顯示就不會(huì)變形占了別的位置
ws.setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
//讓縮放顯示的最小值為起始
webView.setInitialScale(5);
// 設(shè)置支持縮放
webSettings.setSupportZoom(true);
// 設(shè)置縮放工具的顯示
webSettings.setBuiltInZoomControls(true);
- 3 回答
- 0 關(guān)注
- 707 瀏覽
添加回答
舉報(bào)