简体   繁体   中英

show content of recyclcer view in fragment and bottomnavigation using navigation jetpack

I implemented the bottom navigation with Jetpack
in one tab i have recyclerview
I want to enter the details of an item when it is clicked and gone bottom navigation
What is the best way to do this?
using activity or fragment?

Fragments live within the same activity lifecycle, which means that switching from one tab to another won't destroy the activity data. Fragments are therefore the best choice.

Here is a link to a step by step procedure on the implementation. https://proandroiddev.com/step-by-step-to-bottom-navigation-with-jetpacks-navigation-component-and-multiple-nav-graphs-271c05af1dd3

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