ヌガー対応 potatotios #33
Post on 22-Jan-2017
80 Views
Preview:
TRANSCRIPT
ヌガーpotatotips #33
2017/09/28
Hiroshi Hashimoto
自己
Android Developer
Twitter : @hi6484
W/RecyclerView: Cannot call this method in a scroll callback. Scroll callbacks might be run during a measure & layout pass where you cannot change the RecyclerView data. Any method call that might change the structure of the RecyclerView or the adapter contents should be postponed to the next frame. java.lang.IllegalStateException: at android.support.v7.widget.RecyclerView.assertNotInLayoutOrScroll(RecyclerView.java:2403) at android.support.v7.widget.RecyclerView$RecyclerViewDataObserver.onItemRangeInserted(RecyclerView.java:4634) at android.support.v7.widget.RecyclerView$AdapterDataObservable.notifyItemRangeInserted(RecyclerView.java:10472) at android.support.v7.widget.RecyclerView$Adapter.notifyItemInserted(RecyclerView.java:6214)
handler.post(new Runnable()) { @Override public void run() { notifyItemInserted(getItemCount()); } });
new AlertDialog.Builder( Activity.this, R.style.AlertDialogStyle)
top related