기본 webview에서 URL을 여는 방법을 알려주십시오. 아래 코드를 사용하고 있지만 작동하지 않습니다. 아직 의도를 선택하라는 메시지가 표시됩니다. 이 코드는 내 삼성 S2 스마트 폰에서 정상적으로 작동합니다. 갤럭시 타블렛에서는 그렇지 않습니다.안드로이드에서 브라우저 선택을 묻지 않고 webview에서 URL을 여는 방법 Honeycomb
browser.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
//check for key strings in URL to determine next action.
int useNativeIntent = 0;
int bolDone = 0;
//allow loading of this URL
if(useNativeIntent == 0){
showProgress("Loading..","This may take a moment if you have a slow internet connection.");
loadBrowser(url);
}
return true;
}
//loadBrowser
public void loadBrowser(String theUrl){
if(browser != null){
try{
browser.loadUrl(theUrl);
}catch(Exception je){
hideProgress();
showAlert("Error Loading?","There was a problem loading some data. Please check your internet connection then try again.");
}
}
}
변수'browser'는'WebView' rt의 인스턴스입니까? – sunil
예. 그것은 webview입니다. 허니 콤 행동은 다릅니 까? – Harish