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.
@_okaySamurai6 ай бұрын
Add another Scaffold for each screen & add the FAB.
@farouktouil50368 ай бұрын
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?
@_okaySamurai8 ай бұрын
Serif Font Family has been used. I have not done anything extra regarding code auto-compilation. I'm using Android Studio's default settings.
@emmagetsu73698 ай бұрын
excellent video but when I added a lazyGrid the bar stayed below how do I put it on top first
@_okaySamurai8 ай бұрын
You will find "paddingValues" in the Scaffold. Add the "paddingValues" in the LazyGrid's padding. I hope it will work.
@alimahdi101212 күн бұрын
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?
@_okaySamurai12 күн бұрын
Check this updated video: kzfaq.info/get/bejne/iKdmeZt9rd60aHk.html
@RICHARDKOVARLIETZBTW-ye7gu2 ай бұрын
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.
@_okaySamurai2 ай бұрын
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.
@RICHARDKOVARLIETZBTW-ye7gu2 ай бұрын
@@_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
@_okaySamurai2 ай бұрын
As far as my knowledge is concerned, you're using it correctly.
@htilssu4 ай бұрын
how can i change background of selected icon
@_okaySamurai4 ай бұрын
I'm not sure about that. Try to find the color parameter in the Composable functions.
@amitghasoliya4 ай бұрын
i know, go to themes, add colorSecondaryContainer item with required color🫡
@user-rw3oe8zm3q3 ай бұрын
Thanks , can u please share the github repo
@_okaySamurai3 ай бұрын
You're welcome. This is a code-along video. I haven't uploaded it to Github.
@pavlo13748 ай бұрын
This video was very helpful. Ty! Do u have a discord to get in touch with u?
@_okaySamurai8 ай бұрын
I have my mail id in the about section. Feel free to reach out.