android - ViewPager fragment is not working in 2nd time inside navigation drawer fragment properly -
i have navigation drawer
in there 1 fragment tab viewer
. in tabviewer, using viewpager
in fragment
. code viewpager
viewpager = (viewpager) rootview.findviewbyid(r.id.pager); viewpager.setadapter(new tabspageradapter(((fragmentactivity)getactivity()).getsupportfragmentmanager())); pagerslidingtabstrip tabsstrip = (pagerslidingtabstrip) rootview.findviewbyid(r.id.tabs); tabsstrip.setviewpager(viewpager);
the tabs coming in first click in navigation drawer content second time title of tabs coming without layout. layout not coming , swipe not working between different tabs? why working first time not rest? attaching images 2 different click on same navigation drawer fragment. first click layout coming perfectly.
this in 2nd attempt click on same fragment background coming without layout content.
help rid of problem.
use
getchildfragmentmanager()
instead of
((fragmentactivity)getactivity()).getsupportfragmentmanager()
Comments
Post a Comment