How to set size of webview in WallpaperService?
问题 I'm trying to set webview as a live wallpaper, but I have a problem with sizing it. In the Engine I create a webview with WallpaperService's Context: public WallpaperEngine(Context context) { webView = new WebView(context); ... } And I draw it to wallpaper's canvas: SurfaceHolder holder = getSurfaceHolder(); Canvas canvas = null; try { canvas = holder.lockCanvas(); if (canvas != null) { webView.draw(canvas); } } finally { if (canvas != null) holder.unlockCanvasAndPost(canvas); } But the