void pause() { if (runnableAdded && handler !=null && autoPlayRunnable!=null) { handler.removeCallbacks(autoPlayRunnable); runnableAdded = false; } }
@Override void destroyCallbacks() { super.destroyCallbacks(); if (runnableAdded && handler !=null && autoPlayRunnable!=null) { mRecyclerView.smoothScrollToPosition(((ViewPagerLayoutManager)mRecyclerView.getLayoutManager()).getCurrentPosition()); handler.removeCallbacks(autoPlayRunnable); runnableAdded = false; } /// handler = null; }