PagerAdapter return blank always

前端 未结 1 1362
北海茫月
北海茫月 2021-01-16 12:06

I\'m trying to make an image pager and it looks like I\'ve done it correct according to all the tutorials that I\'ve looked up, but all I get is a blank screen. A breakpoint

相关标签:
1条回答
  • 2021-01-16 12:37

    The same way destroyItem() needs to remove the view from the container, instantiateItem() needs to add the view to the container.

    Just add

        container.addView(itemView);
    

    before returning from instantiateItem() and you'll be in business.

    0 讨论(0)
提交回复
热议问题