本文整理汇总了Java中android.webkit.WebHistoryItem.getUrl方法的典型用法代码示例。如果您正苦于以下问题:Java WebHistoryItem.getUrl方法的具体用法?Java WebHistoryItem.getUrl怎么用?Java WebHistoryItem.getUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.webkit.WebHistoryItem
的用法示例。
在下文中一共展示了WebHistoryItem.getUrl方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: printBackForwardList
import android.webkit.WebHistoryItem; //导入方法依赖的package包/类
public void printBackForwardList() {
WebBackForwardList currentList = this.copyBackForwardList();
int currentSize = currentList.getSize();
for(int i = 0; i < currentSize; ++i)
{
WebHistoryItem item = currentList.getItemAtIndex(i);
String url = item.getUrl();
LOG.d(TAG, "The URL at index: " + Integer.toString(i) + " is " + url );
}
}
示例2: startOfHistory
import android.webkit.WebHistoryItem; //导入方法依赖的package包/类
public boolean startOfHistory()
{
WebBackForwardList currentList = this.copyBackForwardList();
WebHistoryItem item = currentList.getItemAtIndex(0);
if( item!=null){ // Null-fence in case they haven't called loadUrl yet (CB-2458)
String url = item.getUrl();
String currentUrl = this.getUrl();
LOG.d(TAG, "The current URL is: " + currentUrl);
LOG.d(TAG, "The URL at item 0 is: " + url);
return currentUrl.equals(url);
}
return false;
}
示例3: startOfHistory
import android.webkit.WebHistoryItem; //导入方法依赖的package包/类
public boolean startOfHistory()
{
WebHistoryItem localWebHistoryItem = copyBackForwardList().getItemAtIndex(0);
boolean bool = false;
if (localWebHistoryItem != null)
{
String str1 = localWebHistoryItem.getUrl();
String str2 = getUrl();
LOG.d("CordovaWebView", "The current URL is: " + str2);
LOG.d("CordovaWebView", "The URL at item 0 is:" + str1);
bool = str2.equals(str1);
}
return bool;
}
示例4: ingoreWebViewBackNavigation
import android.webkit.WebHistoryItem; //导入方法依赖的package包/类
private boolean ingoreWebViewBackNavigation(WebView vpaidWebView) {
if (vpaidWebView != null) {
WebBackForwardList mWebBackForwardList = vpaidWebView.copyBackForwardList();
if (mWebBackForwardList == null) {
return false;
}
WebHistoryItem historyItem = mWebBackForwardList.getItemAtIndex(mWebBackForwardList.getCurrentIndex() - 1);
if (historyItem == null) {
return false;
}
String historyUrl = historyItem.getUrl();
if (historyUrl != null && historyUrl.equalsIgnoreCase(VpaidClient.EMPTY_URL)) {
return true;
}
}
return false;
}