Code example for WebView

Methods: capturePicture, getVerticalScrollbarWidth, getWidth

0
   * 
   * @param webView The WebView to screenshot. 
   * @return A Bitmap with the screenshot. 
   */ 
  public static Bitmap captureScreenshot(WebView webView) {
    Picture picture = webView.capturePicture();
    int width = Math.min(
        picture.getWidth(),
        webView.getWidth() - webView.getVerticalScrollbarWidth());
    int height = Math.min(picture.getHeight(), webView.getHeight());
    Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565);
    Canvas cv = new Canvas(bitmap);
    cv.drawPicture(picture);
    return bitmap;
  } 
 
  public List<String> getDeviceFeatures() {
    List<String> features = new ArrayList<String>(Arrays.asList(Config.STATIC_FEATURES));
    if (ProxySettings.deviceCanProxy()) { 
      features.add(Config.PROXY);
Connect your IDE to all the code out there  Get Codota for Java