You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.NullPointerException at com.futuremind.recyclerviewfastscroll.RecyclerViewScrollListener.updateHandlePosition(RecyclerViewScrollListener.java:47) at com.futuremind.recyclerviewfastscroll.FastScroller.onLayout_Original(FastScroller.java:168) at com.futuremind.recyclerviewfastscroll.FastScroller.onLayout(FastScroller.java:-1) at android.view.View.layout(View.java:17520) at android.view.ViewGroup.layout(ViewGroup.java:5612) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079) at android.view.View.layout(View.java:17520) at android.view.ViewGroup.layout(ViewGroup.java:5612) at android.support.constraint.ConstraintLayout.onLayout_Original(ConstraintLayout.java:1127) at android.support.constraint.ConstraintLayout.onLayout(ConstraintLayout.java:-1) at android.view.View.layout(View.java:17520) at android.view.ViewGroup.layout(ViewGroup.java:5612) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17520) at android.view.ViewGroup.layout(ViewGroup.java:5612) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079) at android.view.View.layout(View.java:17520) at android.view.ViewGroup.layout(ViewGroup.java:5612)
I get the above null pointer exception in my design view.
@karunanaik It's some bug with onLayout. It thinks the RecyclerView has been set. Found a work around: create your own CustomFastScroller extends FastScroller, then override onLayout:
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
if (recyclerView != null) {
super.onLayout(changed, l, t, r, b);
}
}
I got same error.But i fixed by using above code.The below code working fine.Thanks @OverRide
protected void onLayout(boolean changed, int l, int t, int r, int b) {
if (recyclerView != null) {
super.onLayout(changed, l, t, r, b);
}
}
Also,
@OverRide
public void setRecyclerView(RecyclerView recyclerView) {
this.recyclerView = recyclerView;
super.setRecyclerView(recyclerView);
java.lang.NullPointerException at com.futuremind.recyclerviewfastscroll.RecyclerViewScrollListener.updateHandlePosition(RecyclerViewScrollListener.java:47) at com.futuremind.recyclerviewfastscroll.FastScroller.onLayout_Original(FastScroller.java:168) at com.futuremind.recyclerviewfastscroll.FastScroller.onLayout(FastScroller.java:-1) at android.view.View.layout(View.java:17520) at android.view.ViewGroup.layout(ViewGroup.java:5612) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079) at android.view.View.layout(View.java:17520) at android.view.ViewGroup.layout(ViewGroup.java:5612) at android.support.constraint.ConstraintLayout.onLayout_Original(ConstraintLayout.java:1127) at android.support.constraint.ConstraintLayout.onLayout(ConstraintLayout.java:-1) at android.view.View.layout(View.java:17520) at android.view.ViewGroup.layout(ViewGroup.java:5612) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17520) at android.view.ViewGroup.layout(ViewGroup.java:5612) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079) at android.view.View.layout(View.java:17520) at android.view.ViewGroup.layout(ViewGroup.java:5612)
I get the above null pointer exception in my design view.
Below is my xml:
`
Can you please help me and let me know what am I missing here?
The text was updated successfully, but these errors were encountered: