IllegalStateException with PagerAdapter

后端 未结 3 1663
说谎
说谎 2021-02-20 01:47

I am getting an IllegalStateException within this activity but not too sure what is going on. Here is the ViewPagerAdapter class in QuickContactActivity.

private         


        
3条回答
  •  孤城傲影
    2021-02-20 02:39

    The problem is that your list of items/pages to show in the PageAdapter change and you dont call pageAdapter.notifyDataSetChanged().

    If you continue read the message, says that wait for 0 items and get 1. With this, it's seems that you set the adapter before set all the items/pages that the adapter receive.

提交回复
热议问题