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

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

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

WebView.setBackgroundDrawable介绍

暂无

代码示例

代码示例来源:origin: com.albedinsky.android/ui

/**
 */
@Override
@SuppressWarnings("deprecation")
public void setBackgroundDrawable(Drawable background) {
  super.setBackgroundDrawable(background);
  this.ensureDecorator();
  mDecorator.applyBackgroundTint();
}

代码示例来源:origin: ckcz123/PKUHelper-Android

@SuppressWarnings("deprecation")
public static void realSetBackground(Intent data) {
  try {
    File file = MyFile.getFile(PKUHelper.pkuhelper, null, "bg_course_temp.jpg");
    if (file.exists()) {
      drawable = Drawable.createFromPath(file.getAbsolutePath());
      courseView.setBackgroundDrawable(drawable);
      File file2 = MyFile.getFile(PKUHelper.pkuhelper, null, "bg_course.jpg");
      file2.delete();
      file.renameTo(file2);
      PKUHelper.pkuhelper.sendBroadcast(
          new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(file)));
    }
  } catch (Exception | OutOfMemoryError e) {
    CustomToast.showErrorToast(PKUHelper.pkuhelper, "设置失败");
  }
}

代码示例来源:origin: stackoverflow.com

public void onPageFinished(WebView view, String url) {
  if(!isSplashOn) {               
    webView.setBackgroundDrawable(null);
    webView.setBackgroundColor(0);

相关文章

微信公众号

最新文章

更多

WebView类方法