瑙e喅 WebView涓枃涔辩爜闂

WebView鍦ㄦ樉绀轰腑鏂囨椂浼氬嚭鐜颁贡鐮佺殑闂锛岀紪鐮佹柟寮忔敼涓篏BK鎴杇b2312閮戒笉鑳借В鍐抽棶棰樸��

Android 瀹樻柟鏂囨。涓浜庡姞杞紿TML锛岀粰鍑轰簡2涓柟娉曪細


鏂规硶1 锛�

聽 //Loads聽the聽given聽data聽into聽this聽WebView聽using聽a聽'data'聽scheme聽URL.聽聽

void聽loadData(String聽data,聽String聽mimeType,聽String聽encoding)

鏂规硶2锛� //Loads聽the聽given聽data聽into聽this聽WebView,聽using聽baseUrl聽as聽the聽base聽URL聽for聽the聽content.聽聽

void聽loadDataWithBaseURL(String聽baseUrl,聽String聽data,聽String聽mimeType,聽String聽encoding,聽String聽historyUrl)聽聽

灏濊瘯鐨勭粨鏋滄槸锛�

绗竴绉嶆柟娉曟棤璁烘�庝箞鏀癸紝涓枃閮芥槸涔辩爜銆�

绗簩绉嶆柟娉曡嚦灏戣繖鏍风敤鏃讹紝涓枃涓嶆槸涔辩爜銆�

webView.loadDataWithBaseURL(null,data,聽"text/html",聽聽"utf-8",聽null);聽聽

你可能感兴趣的:(瑙e喅 WebView涓枃涔辩爜闂)