lsjwzh / RecyclerViewPager

Deprecated
Apache License 2.0
3.53k stars 667 forks source link

提示不能除0 #209

Open lozn00 opened 6 years ago

lozn00 commented 6 years ago

第一个item 尝试获取的时候会崩溃

lozn00 commented 6 years ago
      @Override
            public void onScrollStateChanged(RecyclerView recyclerView, int newState) {

                if (newState == RecyclerView.SCROLL_STATE_IDLE) {
                    if(binding.viewpager.getCurrentPosition()>0){
                    int actualCurrentPosition = binding.viewpager.getActualCurrentPosition();
                    Log.w(TAG,"actualCurrentPosition:"+actualCurrentPosition);

                    }