本文整理了Java中android.webkit.WebView.reload()
方法的一些代码示例,展示了WebView.reload()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.reload()
方法的具体详情如下:
包路径:android.webkit.WebView
类名称:WebView
方法名:reload
暂无
代码示例来源:origin: bingoogolapple/BGARefreshLayout-Android
@Override
public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
mContentWv.reload();
}
代码示例来源:origin: bingoogolapple/BGARefreshLayout-Android
@Override
public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
mContentWv.reload();
}
代码示例来源:origin: bingoogolapple/BGARefreshLayout-Android
@Override
public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
mContentWv.reload();
}
代码示例来源:origin: TheFinestArtist/FinestWebView-Android
@Override
public void onRefresh() {
webView.reload();
}
});
代码示例来源:origin: bingoogolapple/BGASwipeBackLayout-Android
@Override
public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
mContentWv.reload();
}
代码示例来源:origin: stackoverflow.com
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url.startsWith("tel:")) {
Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse(url));
startActivity(intent);
view.reload();
return true;
}
view.loadUrl(url);
return true;
}
代码示例来源:origin: Justson/AgentWeb
@Override
public void reload() {
if (!AgentWebUtils.isUIThread()) {
mHandler.post(new Runnable() {
@Override
public void run() {
reload();
}
});
return;
}
this.mWebView.reload();
}
代码示例来源:origin: HotBitmapGG/bilibili-android-client
@Override
protected void onPause() {
mWebView.reload();
super.onPause();
}
代码示例来源:origin: JZ-Darkal/AndroidHttpCapture
public void reload(){
if(webView!=null && webView.getUrl()!=null) {
webView.reload();
}
}
代码示例来源:origin: Justson/AgentWeb
@Override
public void onClick(View v) {
if (getWebView() != null) {
clickView.setClickable(false);
getWebView().reload();
}
}
});
代码示例来源:origin: wangdan/AisenWeiBo
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.fillAccount) {
fillAccount();
}
else if (item.getItemId() == R.id.refresh) {
mWebView.reload();
}
return super.onOptionsItemSelected(item);
}
代码示例来源:origin: stackoverflow.com
mWebClient = new WebViewClient(){
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if(url.startsWith("mailto:")){
MailTo mt = MailTo.parse(url);
Intent i = newEmailIntent(MyActivity.this, mt.getTo(), mt.getSubject(), mt.getBody(), mt.getCc());
startActivity(i);
view.reload();
return true;
}
else{
view.loadUrl(url);
}
return true;
}
};
mWebView.setWebViewClient(mWebClient);
public static Intent newEmailIntent(Context context, String address, String subject, String body, String cc) {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.putExtra(Intent.EXTRA_EMAIL, new String[] { address });
intent.putExtra(Intent.EXTRA_TEXT, body);
intent.putExtra(Intent.EXTRA_SUBJECT, subject);
intent.putExtra(Intent.EXTRA_CC, cc);
intent.setType("message/rfc822");
return intent;
}
代码示例来源:origin: stackoverflow.com
public class MyWebViewClient extends WebViewClient {
Activity mContext;
public MyWebViewClient(Activity context){
this.mContext = context;
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if(url.startsWith("mailto:")){
MailTo mt = MailTo.parse(url);
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("text/plain");
i.putExtra(Intent.EXTRA_EMAIL, new String[]{mt.getTo()});
i.putExtra(Intent.EXTRA_SUBJECT, mt.getSubject());
i.putExtra(Intent.EXTRA_CC, mt.getCc());
i.putExtra(Intent.EXTRA_TEXT, mt.getBody());
mContext.startActivity(i);
view.reload();
return true;
}
view.loadUrl(url);
return true;
}
}
代码示例来源:origin: Justson/AgentWeb
@Override
public void onClick(View v) {
if (getWebView() != null) {
mFrameLayout.setClickable(false);
getWebView().reload();
}
}
});
代码示例来源:origin: rmtheis/android-ocr
i.putExtra(Intent.EXTRA_SUBJECT, mt.getSubject());
context.startActivity(i);
view.reload();
代码示例来源:origin: stackoverflow.com
Intent i = newEmailIntent(activity, mt.getTo(), mt.getSubject(), mt.getBody(), mt.getCc());
activity.startActivity(i);
view.reload();
return true;
代码示例来源:origin: wangdan/AisenWeiBo
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.refresh) {
mWebView.reload();
}
else if (item.getItemId() == R.id.copy) {
AisenUtils.copyToClipboard(mWebView.getUrl());
showMessage(R.string.msg_url_copyed);
}
else if (item.getItemId() == R.id.to_browser) {
try {
Intent intent = new Intent();
intent.setAction("android.intent.action.VIEW");
Uri content_url = Uri.parse(mWebView.getUrl());
intent.setData(content_url);
startActivity(intent);
} catch (Exception e) {
}
}
return super.onOptionsItemSelected(item);
}
代码示例来源:origin: cSploit/android
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
mWebView = null;
onBackPressed();
return true;
case R.id.back:
if (mWebView.canGoBack())
mWebView.goBack();
return true;
case R.id.forward:
if (mWebView.canGoForward())
mWebView.goForward();
return true;
case R.id.reload:
mWebView.reload();
default:
return super.onOptionsItemSelected(item);
}
}
代码示例来源:origin: TheFinestArtist/FinestWebView-Android
hideMenu();
} else if (viewId == R.id.menuRefresh) {
webView.reload();
hideMenu();
} else if (viewId == R.id.menuFind) {
代码示例来源:origin: weexteam/weex-hackernews
@Override
public void reload() {
if(getWebView() == null)
return;
getWebView().reload();
}
内容来源于网络,如有侵权,请联系作者删除!