2011-10-18 27 views

回答

16
String historyUrl=""; 
myWebView = (WebView) findViewById(R.id.webViewContent); 
WebBackForwardList mWebBackForwardList = myWebView.copyBackForwardList(); 
if (mWebBackForwardList.getCurrentIndex() > 0) 
historyUrl = mWebBackForwardList.getItemAtIndex(mWebBackForwardList.getCurrentIndex()-1).getUrl(); 

// Previous url is in historyUrl 
+0

埃爾迪,在第一行的末尾加上一個分號 –

相關問題