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: 
I am the author of [this question](https://stackoverflow.com/questions/30078157/webview-draw-not-properly-working-on-latest-android-system-webview-update).

To fix this problem, I had to call `WebView.enableSlowWholeDocumentDraw()` *before* inflating the view in your fragment. In the comments of Mikhail Naganov's answer, I saw that you tried a lot of options but not this one. Below is the code that I use in the `onCreateView()` method of your fragment with the WebView. 

```
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle bundle){
    //Enable the drawing of the whole document for Lollipop to get the whole WebView
    if(Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP){
        WebView.enableSlowWholeDocumentDraw();
    }
    View view = inflater.inflate(R.layout.my_layout, parent, false);

   /* Rest of code */
}

```

There's really nothing else to it. If that doesn't work, then it might be a bug and you should report as Mikhail had suggested. 

Hope this helps !
```
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");
        }
    }
}

```