trafi / anchor-bottom-sheet-behavior

BottomSheet behavior with collapsed, expanded and anchor states
Apache License 2.0
173 stars 25 forks source link

NullPointerException when setting compileSdkVersion to 27 #9

Closed FlorianBergmann closed 6 years ago

FlorianBergmann commented 6 years ago

According to this github issue there is a change when compiling with 27 that leads to onLayoutChild being called before onTouchEvent. Due to this there will be a NullPointerException thrown in line 273:

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.widget.ViewDragHelper.processTouchEvent(android.view.MotionEvent)' on a null object reference at com.bottomsheetbehavior.RNBottomSheetBehavior.onTouchEvent(RNBottomSheetBehavior.java:273)