Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception null pointer #69

Open
winnerawan opened this issue Apr 24, 2019 · 0 comments
Open

Exception null pointer #69

winnerawan opened this issue Apr 24, 2019 · 0 comments

Comments

@winnerawan
Copy link

winnerawan commented Apr 24, 2019

i use your library in 2 project, one in androidx and one in support library
it's work well in androidx, but in support library i got this exception when touch in dimmed area,

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.mancj.slideup.VerticalTouchConsumer.consumeBottomToTop(android.view.View, android.view.MotionEvent)' on a null object reference
        at com.mancj.slideup.SlideUp.onTouch(SlideUp.java:538)

is the problem in my layout or theres something else ? please give me a suggestion

private SlideUp dialog() {
        slideUp = new SlideUpBuilder(mDialog)
                .withListeners(new SlideUp.Listener.Events() {
                    @Override
                    public void onSlide(float percent) {
                        DIM.setAlpha(1 - (percent / 100));
                    }

                    @Override
                    public void onVisibilityChanged(int visibility) {
                        if (visibility== View.VISIBLE) {
                            buttonAction.setVisibility(View.INVISIBLE);
                        } else {
                            buttonAction.setVisibility(View.VISIBLE);
                        }
                    }
                })
                .withStartGravity(Gravity.BOTTOM)
                .withGesturesEnabled(true)
                .withStartState(SlideUp.State.SHOWED)
                .build();
        return slideUp;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant