의 일부 9 설명; 당신의 방법 shouldOverrideUrlLoading에서
:이 경우
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
view.loadUrl(url);
webView.getUrl();
if(url.equals("http://any.com/url")){
//Do any action
Toast tr =Toast.makeText(WebViewTest.this, "Test Passed", Toast.LENGTH_LONG);
tr.show();
//Go to other activity or you can put finish(); to stop the actual activity
//Do other action
Intent i1 = new Intent("com.mypack.courses.Passed");
startActivity(i1);;
return true;
}
if(url.equals("http://any.com/url")){
Toast tr =Toast.makeText(WebViewTest.this, "Test Failed", Toast.LENGTH_LONG);
tr.show();
Intent i2 = new Intent("com.mypack.courses.Failed");
startActivity(i2);
return true;
}
return true;
}
, 만약 ""http://any.com/url "는 웹보기를 통해, 우리가 어떤 행동을, 단지 배치해야합니까에서 사용자가 클릭 당신의 조건이나 방법, 당신은
이미 답변되었습니다 : http://stackoverflow.com/questions/6077141/android-webview-how-to-code-the-back-button/6077173#6077173 – FoamyGuy