简体   繁体   中英

Using TabLayout and ViewPager in fragment

I'm using Tablayout in fragment, and there is no problem.

在此处输入图片说明

but when i click on items and open details fragment (i add the new fragment in back stack) after pop back stack, The Tablayout root fragment just show tabs and viewPager is empty.

在此处输入图片说明

How can i solve this problem?

I solved problem. should use getChildFragmentManager() instead getSupportFragmentManager() to assign view pager adapter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM