0
爲了webview,我寫了html5和javascript,jquery相關的代碼。下面的代碼將信息窗口設置爲marker.Please告訴我這將是什麼錯誤代碼。爲什麼webview在android中的標記的信息窗口中不可見
map.setInfoWindowAdapter(new InfoWindowAdapter() {
@Override
public View getInfoWindow(Marker arg0) {
return null;
}
@Override
public View getInfoContents(Marker arg0) {
View v = getLayoutInflater().inflate(R.layout.popups,
null);
WebView webView = (WebView) v
.findViewById(R.id.webview_popup);
TextView open = (TextView) v
.findViewById(R.id.open_popup);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadDataWithBaseURL("file:///android_asset/",objectValue.trim(),
"text/html", "utf-8", null);
open.setText("Open");
return v;
}
});
這裏objectValue意味着Html5的字符串類型
請前往[http://stackoverflow.com/questions/15989891/android-setinfowindowadapter-with-webview-in-google-marker-api-v2?rq = 1](http://stackoverflow.com/questions/15989891/android-setinfowindowadapter-with-webview-in-google-marker-api-v2?rq=1) –
好的,thanks.how將webview轉換爲imageview如果webview不支持 – Surekha