android - Nested ViewPager not displaying -
i writing application used nested viewpager. every parent viewpager contain 7 child viewpager.
it work first parent, when reached next page show blank @ place of child viewpager.
any suggestion here, if it's feasible use nested view pager even? , if how can avoid case?
parent viewpager layout , same child fragment:
<framelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:customfont="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" > <android.support.v4.view.viewpager android:id="@+id/calendarviewpager" android:layout_width="match_parent" android:layout_height="match_parent" > </android.support.v4.view.viewpager>
and child viewpager adapter implementation doing parent viewpager fragment:
private void processdatacardadapter(view view) { childviewpager = (viewpager) view.findviewbyid(r.id.childviewpager); childslidepageradapter = new childslidepageradapter(parentactivity.getsupportfragmentmanager()); childviewpager.setadapter(childslidepageradapter); childviewpager.setonpagechangelistener(new viewpager.simpleonpagechangelistener() { @override public void onpageselected(int position) { utils.showtoast(parentactivity, "sds position : " + position); } }); }
change fragmentmanager work me: change
new childslidepageradapter(parentactivity.getsupportfragmentmanager());
by
new childslidepageradapter(getchildfragmentmanager());
Comments
Post a Comment