When i drag up side i have upate the value in list according to postion .the value is updated .but i have update the adpter .the app is crashed .please help the when use drap up how to notify the adapter.
Error:- java.lang.IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling com.yuyakaido.android.cardstackview.CardStackView{9fe6b51 VFED..... .F....I. 0,0-720,1110 #7f0a0053 app:id/card_stack_view}, adapter:com.foggy.ui.home.CardStackAdapter@7ac8fb6, layout:com.yuyakaido.android.cardstackview.CardStackLayoutManager@506d4b7, context:com.foggy.ui.drawer.Drawer@6c12a4f
at androidx.recyclerview.widget.RecyclerView.assertNotInLayoutOrScroll(RecyclerView.java:2880)
at androidx.recyclerview.widget.RecyclerView$RecyclerViewDataObserver.onChanged(RecyclerView.java:5281)
at androidx.recyclerview.widget.RecyclerView$AdapterDataObservable.notifyChanged(RecyclerView.java:11997)
at androidx.recyclerview.widget.RecyclerView$Adapter.notifyDataSetChanged(RecyclerView.java:7070)
at com.foggy.ui.home.HomeFragment.onCardDragging(HomeFragment.kt:88)
When i drag up side i have upate the value in list according to postion .the value is updated .but i have update the adpter .the app is crashed .please help the when use drap up how to notify the adapter. Error:- java.lang.IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling com.yuyakaido.android.cardstackview.CardStackView{9fe6b51 VFED..... .F....I. 0,0-720,1110 #7f0a0053 app:id/card_stack_view}, adapter:com.foggy.ui.home.CardStackAdapter@7ac8fb6, layout:com.yuyakaido.android.cardstackview.CardStackLayoutManager@506d4b7, context:com.foggy.ui.drawer.Drawer@6c12a4f at androidx.recyclerview.widget.RecyclerView.assertNotInLayoutOrScroll(RecyclerView.java:2880) at androidx.recyclerview.widget.RecyclerView$RecyclerViewDataObserver.onChanged(RecyclerView.java:5281) at androidx.recyclerview.widget.RecyclerView$AdapterDataObservable.notifyChanged(RecyclerView.java:11997) at androidx.recyclerview.widget.RecyclerView$Adapter.notifyDataSetChanged(RecyclerView.java:7070) at com.foggy.ui.home.HomeFragment.onCardDragging(HomeFragment.kt:88)