Exception null pointer
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 207
- PR merge metrics
- No merged PRs in 30d
Description
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
```java
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;
}
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the support-library case described in the issue, touching the dimmed area with gestures enabled, then inspect SlideUp.java at line 538 and the SlideUpBuilder setup shown. Confirm the cause using the reported stack trace; done means the same interaction no longer produces a NullPointerException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100