android.webkit.WebView.getResources()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(160)

本文整理了Java中android.webkit.WebView.getResources()方法的一些代码示例,展示了WebView.getResources()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.getResources()方法的具体详情如下:
包路径:android.webkit.WebView
类名称:WebView
方法名:getResources

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:

相关文章

WebView类方法