Question: I would like to know how to create a clickable button in HTML format that sits on in the center of a header image.

I have tried to use the button tags along with the href attribute along with the img tags to try to wrap the code around the desired image but it doesn't work. An example of the result that I am trying to achieve can be found in the header on [github.com](http://github.com).

Answer: 
Struggled with this/similar issue myself for ages. Finally found a solution, for some reason `webView.draw(page.getCanvas())` renders the whole content with KitKat but not with Lollipop (even with `enableSlowWholeDocumentDraw()`).   

However, using `(webView.capturePicture()).draw(page.getCanvas())` in combination with `enableSlowWholeDocumentDraw()` DOES work for Lollipop, although `capturePicture()` is deprecated.   

A final potentially important point to note is that typically you see many calls to "onDraw" as a webView loads its data and I found that with Lollipop my snapshot was getting taken prematurely (before the content had been fully loaded - annoyingly even the `onPageFinished()` callback method of webViewClient does not guarantee this!) - my solution was to have a custom webView and in the onDraw method, add this as the FIRST LINE: `if(this.getContentHeight() == 0) return;` 
i.e. don't bother to do any drawing unless there is some proper content.
That way you should never get a blank page snapshot - although from your description it sounds like this might not be impacting you....
```
if(Build.VERSION.SDK_INT>=21)    {
    WebView.enableSlowWholeDocumentDraw();
}

public void capture(WebView webView) {
    WebView lObjWebView = webView;
    lObjWebView.measure(MeasureSpec.makeMeasureSpec(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
    lObjWebView.layout(0, 0, lObjWebView.getMeasuredWidth(), lObjWebView.getMeasuredHeight());
    Bitmap bm = Bitmap.createBitmap(lObjWebView.getMeasuredWidth(), lObjWebView.getMeasuredHeight(), Bitmap.Config.ARGB_8888);

    Canvas bigcanvas = new Canvas(bm);
    Paint paint = new Paint();
    int iHeight = bm.getHeight();
    bigcanvas.drawBitmap(bm, 0, iHeight, paint);
    lObjWebView.draw(bigcanvas);

    if (bm != null) {
        try {
            File dir = new File(Environment.getExternalStorageDirectory() + "/" + "folder");

            Calendar lObjCalendar = Calendar.getInstance();

            int hour = lObjCalendar.get(Calendar.HOUR);
            int min = lObjCalendar.get(Calendar.MINUTE);
            int sec = lObjCalendar.get(Calendar.SECOND);
            int mili = lObjCalendar.get(Calendar.MILLISECOND);
            int day = lObjCalendar.get(Calendar.DAY_OF_YEAR);
            int month = lObjCalendar.get(Calendar.MONTH);
            int year = lObjCalendar.get(Calendar.YEAR);

            String realDate = "ERS_" + day + month + year + "_" + hour + min + sec + mili;

            if (dir.exists()) {
                OutputStream fOut = null;
                File file = new File(dir, realDate + ".jpg");
                fOut = new FileOutputStream(file);

                bm.compress(Bitmap.CompressFormat.PNG, 50, fOut);
                fOut.flush();
                fOut.close();
                bm.recycle();
            }
            else {

                if (dir.mkdir()) {
                    OutputStream fOut = null;
                    File file = new File(dir, realDate + ".jpg");
                    fOut = new FileOutputStream(file);

                    bm.compress(Bitmap.CompressFormat.PNG, 50, fOut);
                    fOut.flush();
                    fOut.close();
                    bm.recycle();
                }
                else {
                    ProjectUtil.showToast(WebPayment.this, "Problem in saving webview in external storage");
                }
            }
        }
        catch (FileNotFoundException e) {
            ProjectUtil.showToast(WebPayment.this, "Problem in saving webview in external storage");
        }
        catch (IOException e) {
            ProjectUtil.showToast(WebPayment.this, "Problem in saving webview in external storage");
        }
        catch (Exception e) {
            ProjectUtil.showToast(WebPayment.this, "Problem in saving webview in external storage");
        }
    }
}

```