Skip to content

Exception null pointer #69

@winnerawan

Description

@winnerawan

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;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions