{"action":"created","issue":{"url":"https://api.github.com/repos/cymcsg/UltimateRecyclerView/issues/59","labels_url":"https://api.github.com/repos/cymcsg/UltimateRecyclerView/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/cymcsg/UltimateRecyclerView/issues/59/comments","events_url":"https://api.github.com/repos/cymcsg/UltimateRecyclerView/issues/59/events","html_url":"https://github.com/cymcsg/UltimateRecyclerView/issues/59","id":83867348,"number":59,"title":"Error in load more...","user":{"login":"mori-honest","id":5219339,"avatar_url":"https://avatars.githubusercontent.com/u/5219339?v=3","gravatar_id":"","url":"https://api.github.com/users/mori-honest","html_url":"https://github.com/mori-honest","followers_url":"https://api.github.com/users/mori-honest/followers","following_url":"https://api.github.com/users/mori-honest/following{/other_user}","gists_url":"https://api.github.com/users/mori-honest/gists{/gist_id}","starred_url":"https://api.github.com/users/mori-honest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mori-honest/subscriptions","organizations_url":"https://api.github.com/users/mori-honest/orgs","repos_url":"https://api.github.com/users/mori-honest/repos","events_url":"https://api.github.com/users/mori-honest/events{/privacy}","received_events_url":"https://api.github.com/users/mori-honest/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-02T06:25:40Z","updated_at":"2015-06-02T10:01:33Z","closed_at":null,"body":"My code just work fine before adding these lines but I get this error when adding load more:\r\n\r\n    mRecyclerView.enableLoadmore();\r\n        adapter.setCustomLoadMoreView(LayoutInflater.from(getActivity())\r\n                .inflate(R.layout.progressbar_bottom_load_more_recycler_view, null));\r\n        mRecyclerView.setOnLoadMoreListener(new UltimateRecyclerView.OnLoadMoreListener() {\r\n            @Override\r\n            public void loadMore(int itemsCount, final int maxLastVisiblePosition) {\r\n                new Handler().postDelayed(new Runnable() {\r\n                    public void run() {\r\n                        // todo: insert new items at the end of list....\r\n                        // adapter.insert(\"More \" + moreNum++, simpleRecyclerViewAdapter.getAdapterItemCount());\r\n                        CallLogAdapter.HistoryItem historyItem = new CallLogAdapter.HistoryItem();\r\n                        adapter.insert(historyItem, adapter.getAdapterItemCount());\r\n                        adapter.insert(historyItem, adapter.getAdapterItemCount());\r\n                        adapter.insert(historyItem, adapter.getAdapterItemCount());\r\n                    }\r\n                }, 3000);\r\n            }\r\n\r\nThe error:\r\n\r\n    06-02 10:50:49.217    9898-9898/co.a.m E/AndroidRuntime﹕ FATAL EXCEPTION: main\r\n    Process: co.a.m , PID: 9898\r\n    java.lang.IndexOutOfBoundsException: Invalid index 30, size is 30\r\n            at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)\r\n            at java.util.ArrayList.get(ArrayList.java:308)\r\n            at co.a.m.view.adapter.CallLogAdapter.getItem(CallLogAdapter.java:105)\r\n            at co.a.m.view.adapter.CallLogAdapter.onBindViewHolder(CallLogAdapter.java:90)\r\n            at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:4805)\r\n            at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4106)\r\n            at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:3999)\r\n            at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1892)\r\n            at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1338)\r\n            at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1301)\r\n            at android.support.v7.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1128)\r\n            at android.support.v7.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java:985)\r\n            at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:3458)\r\n            at android.view.Choreographer$CallbackRecord.run(Choreographer.java:799)\r\n            at android.view.Choreographer.doCallbacks(Choreographer.java:599)\r\n            at android.view.Choreographer.doFrame(Choreographer.java:558)\r\n            at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:784)\r\n            at android.os.Handler.handleCallback(Handler.java:733)\r\n            at android.os.Handler.dispatchMessage(Handler.java:95)\r\n            at android.os.Looper.loop(Looper.java:157)\r\n            at android.app.ActivityThread.main(ActivityThread.java:5872)\r\n            at java.lang.reflect.Method.invokeNative(Native Method)\r\n            at java.lang.reflect.Method.invoke(Method.java:515)\r\n            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)\r\n            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:674)\r\n            at dalvik.system.NativeStart.main(Native Method)\r\n\r\n\r\nInvalid index 30, size is 30??????!!!!!!!!"},"comment":{"url":"https://api.github.com/repos/cymcsg/UltimateRecyclerView/issues/comments/107904603","html_url":"https://github.com/cymcsg/UltimateRecyclerView/issues/59#issuecomment-107904603","issue_url":"https://api.github.com/repos/cymcsg/UltimateRecyclerView/issues/59","id":107904603,"user":{"login":"cymcsg","id":963906,"avatar_url":"https://avatars.githubusercontent.com/u/963906?v=3","gravatar_id":"","url":"https://api.github.com/users/cymcsg","html_url":"https://github.com/cymcsg","followers_url":"https://api.github.com/users/cymcsg/followers","following_url":"https://api.github.com/users/cymcsg/following{/other_user}","gists_url":"https://api.github.com/users/cymcsg/gists{/gist_id}","starred_url":"https://api.github.com/users/cymcsg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cymcsg/subscriptions","organizations_url":"https://api.github.com/users/cymcsg/orgs","repos_url":"https://api.github.com/users/cymcsg/repos","events_url":"https://api.github.com/users/cymcsg/events{/privacy}","received_events_url":"https://api.github.com/users/cymcsg/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T10:01:32Z","updated_at":"2015-06-02T10:01:32Z","body":"The last item of the basic adapter is ``loading more`` item.So if you want to use loadingmore and stickyheader at the same time, you should set a empty value to the last item.\r\nIt's really ugly,but I need some time to make it better."}}