Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Android navigation architecture component with tab layout [duplicate]

Are there any uses for navigation with the viewpager? I can not find information about this and I do not understand how this can be done.

I have an simple two fragments which is need to put inside viewpager and if its possible via navigation.

like image 610
Roman Avatar asked Feb 27 '26 22:02

Roman


1 Answers

As per this issue:

Navigation focuses on elements that affect the back stack and tabs do not affect the back stack - you should continue to manage tabs with a ViewPager and TabLayout

like image 53
ianhanniballake Avatar answered Mar 01 '26 10:03

ianhanniballake



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!