[Catalog] Fix the wrong use of FragmentManager in TabsControllableDemoFragment

Resolves https://github.com/material-components/material-components-android/issues/1553
Resolves https://github.com/material-components/material-components-android/pull/1554

GIT_ORIGIN_REV_ID=4c7c1ab154892c665b4a67215a88e781da218ab6
PiperOrigin-RevId: 324207016
This commit is contained in:
Yongce Tu 2020-07-31 10:48:35 -04:00 committed by Daniel Nizri
parent 64b3387cb2
commit e940c09fcf

View File

@ -170,7 +170,7 @@ public class TabsControllableDemoFragment extends DemoFragment {
}
private void setupViewPager() {
pager.setAdapter(new TabsPagerAdapter(getFragmentManager(), getContext(), TAB_COUNT));
pager.setAdapter(new TabsPagerAdapter(getChildFragmentManager(), getContext(), TAB_COUNT));
for (TabLayout tabLayout : tabLayouts) {
tabLayout.setupWithViewPager(pager);
}