title: How take a screenshot of whole webpage not only the visible portion
body: <p>I found it from the internet but it just take screenshot of current view of a webview which is visible to the user but not the whole webpage which is loaded in the webview.Had someone gone through this problem ? Help plz</p>
  
  <p>This is my code:</p>
  
  <pre><code>            View v1 = getWindow().getDecorView().findViewById(R.id.webView);
              v1.setDrawingCacheEnabled(true);
              Bitmap bitmap = Bitmap.createBitmap(v1.getDrawingCache());
              v1.setDrawingCacheEnabled(false);
  </code></pre>
  
  <p>I have also used these methods but still i didn't get the screenshot of whole webview ...</p>
  
  <pre><code>            View v1 = wv.getRootView();
              View v1 = iv.getRootView(); 
              View v1 = findViewById(android.R.id.content); 
  </code></pre>