Ollie Strevel
Ollie Strevel

Reputation: 871

ViewPager, getChildFragmentManager() & getFragmentManager()

I'm developing an android app, with TabHost & FragmentActivity in each tab.

In my first tab I initialize a fragment with a ViewPager indicator and a button, this button open a dialog with another ViewPager indicator, but my problem is the ViewPager in the fragment root activity is clashing with the ViewPager's dialog.

In the root activity I'm calling getChildFragmentManager()... and is OK but in the dialog ViewPager I'm calling again getChildFragmentManager but not working...

What am I doing wrong?

Upvotes: 7

Views: 2186

Answers (1)

youssefhassan
youssefhassan

Reputation: 1065

I think the dialog is independent from the fragments so try getFragmentManager() or if you are using support library use getSuportingFragmentManager()

Upvotes: 1

Related Questions