本文整理了Java中android.webkit.WebView.getResources()
方法的一些代码示例,展示了WebView.getResources()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.getResources()
方法的具体详情如下:
包路径:android.webkit.WebView
类名称:WebView
方法名:getResources
暂无
代码示例来源:origin: ankidroid/Anki-Android
private void appendTodaysStats(StringBuilder stringBuilder) {
Stats stats = new Stats(mCol, mDeckId);
int[] todayStats = stats.calculateTodayStats();
stringBuilder.append(_title(mWebView.getResources().getString(R.string.stats_today)));
Resources res = mWebView.getResources();
final int minutes = (int) Math.round(todayStats[THETIME_INDEX] / 60.0);
final String span = res.getQuantityString(R.plurals.time_span_minutes, minutes, minutes);
stringBuilder.append(res.getQuantityString(R.plurals.stats_today_cards,
todayStats[CARDS_INDEX], todayStats[CARDS_INDEX], span));
stringBuilder.append("<br>");
stringBuilder.append(res.getString(R.string.stats_today_again_count, todayStats[FAILED_INDEX]));
if (todayStats[CARDS_INDEX] > 0) {
stringBuilder.append(" ");
stringBuilder.append(res.getString(R.string.stats_today_correct_count, (((1 - todayStats[FAILED_INDEX] / (float) (todayStats[CARDS_INDEX])) * 100.0))));
}
stringBuilder.append("<br>");
stringBuilder.append(res.getString(R.string.stats_today_type_breakdown, todayStats[LRN_INDEX], todayStats[REV_INDEX], todayStats[RELRN_INDEX], todayStats[FILT_INDEX]));
stringBuilder.append("<br>");
if (todayStats[MCNT_INDEX] != 0) {
stringBuilder.append(res.getString(R.string.stats_today_mature_cards, todayStats[MSUM_INDEX], todayStats[MCNT_INDEX], (todayStats[MSUM_INDEX] / (float) (todayStats[MCNT_INDEX]) * 100.0)));
} else {
stringBuilder.append(res.getString(R.string.stats_today_no_mature_cards));
}
}
代码示例来源:origin: ankidroid/Anki-Android
Resources res = mWebView.getResources();
代码示例来源:origin: box/box-android-sdk
switch (error.getPrimaryError()) {
case SslError.SSL_DATE_INVALID:
sslErrorType = view.getResources().getString(R.string.boxsdk_ssl_error_warning_DATE_INVALID);
break;
case SslError.SSL_EXPIRED:
内容来源于网络,如有侵权,请联系作者删除!