Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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!

like image 518
Asheesh Avatar asked Dec 09 '25 08:12

Asheesh


1 Answers

    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);
    }
like image 56
Null Pointer Exception Avatar answered Dec 10 '25 23:12

Null Pointer Exception



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!