IllegalStateException: The application's PagerAdapter changed the adapter's content without calling PagerAdapter#notifyDataSetChanged

前端 未结 10 2083
感情败类
感情败类 2020-11-29 06:52

I\'m using the ViewPager example with ActionBar tabs taken from the Android documentation here.

Unfortunately, as soon as I call the

10条回答
  •  清酒与你
    2020-11-29 07:39

    add this line into your adapter file where the public Object instantiateItem(ViewGroup container, int position) method is called

    ((ViewPager) container).addView(view); return view;

提交回复
热议问题