7

Dynamically generating fragments for a ViewPager

view full story
linux-howto

http://stackoverflow.com – I am new to using a ViewPager, but the initial screen on my app is a ListView that the user can add/remove new items to, then clicking on one of the items brings them to a "details" fragment based on an id that is passed. I'd like for the user to also be able to swipe from the listing through to each of the details. I have the ViewPager working, except the id's are always off by one. This might be my lack of understanding of ViewPagers, but if I put a breakpoint in the onCreateView of the details fragment, the breakpoint is hit when the app loads and the id that is passed is the first id. (HowTos)