问题
Currenlty I am working in a project where I have to select multiple images from gallery and have to display all selected images as a swipeable view(viewpager indicator). I have gone through many examples but every where I found static images with viewpager. How to show selected images in viewpager with indicator?
I am following this for selecting multiple images https://github.com/luminousman/MultipleImagePick
回答1:
Use ViewPager with FragmentStatePagerAdapter if you have more data to show or FragmentPagerAdapter.
You can read here about the difference between these two and when to use it.
Difference between FragmentPagerAdapter and FragmentStatePagerAdapter
Use CircularPageIndicator for images indication.
Now coming back to your question, you want to show the selected data or say images, you can pass these images to the viewPager adapter and it will takes care of it.
Read here, about how to use FragmentStatePagerAdapter with ViewPager.
https://guides.codepath.com/android/ViewPager-with-FragmentPagerAdapter
来源:https://stackoverflow.com/questions/35424736/viewpager-indicator-with-images-selected-from-gallery