主要是因为在viewpager更新fragment时优先更新缓存的fragment而不是你更新的list,所以解决主要删除fragment缓存就行了。主要方法如下
myAdapter=new FragmentStatePagerAdapter(getSupportFragmentManager()) { @Override public int getCount() { return fragments.size(); } @Override public Fragment getItem(int position) { return fragments.get(position); } @Override public Object instantiateItem(ViewGroup container, int position) { return super.instantiateItem(container, position); } @Override public void destroyItem(ViewGroup container, int position, Object object) { super.destroyItem(container, position, object); } public int getItemPosition(Object object) { return POSITION_NONE; } }; myAdapter.notifyDataSetChanged(); vp.setAdapter(myAdapter);红色部分为主要部分