在動態(tài)使用viewpager的時候,數(shù)據源切換getcount 來不及更新 數(shù)據異步是會出現(xiàn)下面那個錯誤。
bug1:
count數(shù)量不一致導致?PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 0, found: 20?
此時需要延時操作:
對數(shù)據進行延時更新操作,并及時刷新adapter

bug1:
pagerAdapter中destroyItem遇到indexOutOfBoundsException 在以上基礎上 也是數(shù)據源多轉少時造成的越界
解決方法:
從container中直接移除view,而不是從數(shù)據源的list集合中移除控件
