Bottom Nav Bar #03 | Material 3 | Jetpack Compose
Вставка
- Опубліковано 25 вер 2023
- 🎉 Check Out Our Apps! 🎉
💸 Expense Tracker App (Play Store): bit.ly/Paywise
📚 English Dictionary App (Play Store): bit.ly/MavenEnglishDictionaryApp
➕📐 Math Formula App (Play Store): bit.ly/MathFormulaApp
🎶 Music by CreatorMix.com
Expense Tracker App - play.google.com/store/apps/details?id=com.androidactivity.expensetracker
This is awesome. Thank you
Muy buen video ❤
Thank you ❤
amaizing!
hey! I want to have a floating action button along with it. How can i have the button perform differently based on the screen it is currently on. For example, i have three sections: tasks, notes and grocery. when on the task screen i want to show a bottom sheet for adding task and when on the notes screen i want it to navigate to add notes screen.
Add another Scaffold for each screen & add the FAB.
Hello, can you explain the selected parameter's logic for NavigationBarItem
I did it as currentDestination.route == it.route and it works fine as intended
Is there something wrong with my version?
Check this updated video: ua-cam.com/video/RA6F8LHxP8E/v-deo.html
Thanks for the tutorial, I implemented this for a project a few weeks ago. Had a quick question though since I’m super new to compose - if I want to have some data on the screens ‘save’ while jumping from one screen to another (like the selection of a drop-down menu, or the text in a search), what’s the best practice to do so?
I’ve implemented a ‘SearchViewModel’ class that is instantiated the AppNavigation composable we made, and then I pass it into the SearchScreen, and so now, the data in there lives even when I jump from search composable to home back to search (since I guess it’ll keep living until we terminate app)
Is this the right way to handle it? With view models? Cause I’m thinking of using a similar thing for another one of my screens to keep the data from resetting. Apologies for the long comment, thanks again.
I have a video about ViewModel on my channel; check it out. ViewModel helps us survive configuration changes, such as rotation and theme changes. Using ViewModel is a good practice. Additionally, we can use rememberSaveable for the same purpose.
@@_okaySamurai yeah I was checking out that video and a couple other ones yesterday while making the search one. Just wanted to confirm that I’m using them correctly, ik they’re mainly used for configuration changes but I guess they also fit in this scenario when I wanna save some data between screen changes
As far as my knowledge is concerned, you're using it correctly.
Hi thank you for this Navigation demo code...Will you tell me please what is the name of the font family you are using and ? and is there something to configure for the code autocomplition you can advice about?
Serif Font Family has been used.
I have not done anything extra regarding code auto-compilation. I'm using Android Studio's default settings.
excellent video but when I added a lazyGrid the bar stayed below how do I put it on top first
You will find "paddingValues" in the Scaffold. Add the "paddingValues" in the LazyGrid's padding. I hope it will work.
how can i change background of selected icon
I'm not sure about that. Try to find the color parameter in the Composable functions.
i know, go to themes, add colorSecondaryContainer item with required color🫡
Thanks , can u please share the github repo
You're welcome. This is a code-along video. I haven't uploaded it to Github.
This video was very helpful. Ty! Do u have a discord to get in touch with u?
I have my mail id in the about section. Feel free to reach out.