Page Curl effect using harism page curl library, page background appears with black border in place of transparency.

633 Views Asked by At

Hi I am using Harism Library for page curl effect (https://github.com/harism/android_page_curl). The effect is working fine but my page background has some transparent part which appears black. I have tried the solution mentioned in github forum (https://github.com/harism/android_page_curl/issues/25), its works but after that curl is not working. You can check my query there as well. You can check the attached screen shot as well.enter image description here

Thanks!

2

There are 2 best solutions below

2
Null Pointer Exception On BEST ANSWER
    Comments these lines in the activity
                   r.left += border;
                   r.right -= border;
                   r.top += border;
                   r.bottom -= border;

                    r.left += ((r.width() - imageWidth) / 2) - border;
                    r.right = r.left + imageWidth + border + border;
                    r.top += ((r.height() - imageHeight) / 2) - border;
                    r.bottom = r.top + imageHeight + border + border;
replace this function in the CurlView Activity

public void setMargins(float left, float top, float right, float bottom) {
        mRenderer.setMargins(left, top, right, bottom);
    }
2
Atif AbbAsi On

Check For setMargin() Function in CurlActivity make it 0 ,0 .!