No video

Safe Args - Send Custom Object - Navigation Component | Android Studio Tutorial

  Рет қаралды 16,927

Stevdza-San

Stevdza-San

Күн бұрын

🏆 My Online Courses
⭐Discount Coupon: LAUNCH-STEVDZA-SAN
stevdza-san.com
🐱‍👤 Wanna become a member? Join!
/ @stevdzasan
📸 Instagram
/ stevdza_san
In this video I'm going to show you how to pass a Custom Object between multiple destinations, using Safe Args plugin of Navigation Component. Implementing that would be a lot easier in Kotlin then it would be in Java. We are going to make our class implement Parcelable, and at the end of the video I'll show you the power of Kotlin programming language and how it generates a lots of boilerplate code in the background for us. Enjoy! :)

Пікірлер: 38
@AmitSharmaplus
@AmitSharmaplus 3 жыл бұрын
saved my day. also worked with passing List data . perfect.
@O11liver11
@O11liver11 3 жыл бұрын
Thank you for existing. Keep up the good work my friend. I learned a lot from this series!!
@jaskarandeepsingh2210
@jaskarandeepsingh2210 2 жыл бұрын
saved my hours of code, i cound parcelise my data earlier thanks to this video, saved my code
@dshorts9604
@dshorts9604 2 ай бұрын
Thanks sir ❤
@atila_tv
@atila_tv 3 жыл бұрын
I wish I could give you more than one like!! You just earned a new subscriber
@ericgacoki2225
@ericgacoki2225 4 жыл бұрын
I do learn a lot from you!.
@mubaraknative
@mubaraknative Жыл бұрын
1 like is added to this video!😃
@MtaufiqH731
@MtaufiqH731 4 жыл бұрын
As always, perfect !!
@ngocanho4323
@ngocanho4323 3 жыл бұрын
godness, the direction will appear after rebuilding :"< luckily that u talked about it, ty so much
@azazovsky2553
@azazovsky2553 3 жыл бұрын
Who has error "Unsolved reference" with @Parcelize annotation - you just need to apply plugin 'kotlin-parcelize' in project graddle
@lucasfelici2544
@lucasfelici2544 2 жыл бұрын
Same over here, I just didn't use the notation @Parcelize, implement the members required by android studio and works fine for me.
@jovzone6601
@jovzone6601 3 жыл бұрын
U R awesome ❤️ Keep up man
@subindsuresh4897
@subindsuresh4897 2 жыл бұрын
Thank you again
@michaelwright8576
@michaelwright8576 3 жыл бұрын
What is the difference between Pacelizable and Serilizable
@pritech8302
@pritech8302 2 жыл бұрын
thank you so much sir
@ArsenAl-zorK
@ArsenAl-zorK 3 жыл бұрын
How did you add the back button in the toolbar on the second fragment only?
@alij3fer
@alij3fer 4 жыл бұрын
Good job sir 😍
@immersivevr3605
@immersivevr3605 2 жыл бұрын
Thanks a lot bro!
@StevdzaSan
@StevdzaSan 2 жыл бұрын
You're welcome!
@abdelazizkhalid4231
@abdelazizkhalid4231 Жыл бұрын
@parcelized in deprecated is there a new way instead if implanting the interface?
@salihyucell
@salihyucell Жыл бұрын
so how do we send protobuf java files as parameters with nav arg
@manshalkhatri9289
@manshalkhatri9289 2 жыл бұрын
Helpful
@emmanuelpregnolato5026
@emmanuelpregnolato5026 3 жыл бұрын
Really good series thank you. Can you do something with MVVM and Coroutines?
@julesruzindana-rukundo6254
@julesruzindana-rukundo6254 Жыл бұрын
do i have to add this plugin or is the safeArgs sufficient ?plugins { id("kotlin-parcelize") }
@Anuuurag
@Anuuurag Жыл бұрын
works great just needed to add id 'kotlin-parcelize' in app build.gradle file as one kotlin android extensions is deprecated
@sumukhaithal2819
@sumukhaithal2819 2 жыл бұрын
So if I want to send ArrayList, I have to choose array option in the add argument window along with everything else you mentioned in the video, is it ?
@sathish6198
@sathish6198 4 жыл бұрын
Nice 👌❤️
@Effectivebasketball
@Effectivebasketball 3 жыл бұрын
I have a question why not use ViewModel it seems to be stright forward and it suggested by best practices? "This approach offers the following benefits: The activity does not need to do anything, or know anything about this communication. Fragments don't need to know about each other besides the SharedViewModel contract. If one of the fragments disappears, the other one keeps working as usual. Each fragment has its own lifecycle, and is not affected by the lifecycle of the other one. If one fragment replaces the other one, the UI continues to work without any problems." reference - developer.android.com/topic/libraries/architecture/viewmodel#sharing could you please give some feedback regarding your experiences with it? Thank you.
@milamarinkovic8199
@milamarinkovic8199 3 жыл бұрын
Is it possible to pass data from AppCompactActivity to Fragment, if so, how? E.g. if I have AddEmployeeActivity (of type AppCompatActivity) and EmployeeFragment (of type Fragment), so when I fill in the employee details, I want to click the button and transition to the EmployeeFragment where a new employee will be created using the filled information?
@alfredowusu9256
@alfredowusu9256 2 жыл бұрын
Would you be able to use this method to save data from Fragment A and pass it on to say Fragment C?
@hdkloh6857
@hdkloh6857 4 жыл бұрын
How can we get data from Fragment B to Fragment A by this method...?
@hachij_
@hachij_ 4 жыл бұрын
same method as shown in video
@StevdzaSan
@StevdzaSan 4 жыл бұрын
Just add an argument on Fragment A.
@hdkloh6857
@hdkloh6857 4 жыл бұрын
@@StevdzaSan Thanks man... Waiting for more videos on retrofit series
@anudeepananth
@anudeepananth 4 жыл бұрын
Hey Stevdza-San, the navigation component seems pretty powerful abut the one reason i dont use it in my app is because it doesnt seem to have the feature to save the fragment state, so I use fragment manager to hide/show fragments when the concerned buttons are clicked ( like in a bottom navigation bar ), could you please make a video or even let me know if saving fragment state is possible with the navigation library....
@StevdzaSan
@StevdzaSan 4 жыл бұрын
The answer is Shared ViewModel. Check this out: stackoverflow.com/questions/59629541/how-to-save-fragment-state-while-navigating-with-navigation-component
@anmolsharma9539
@anmolsharma9539 3 жыл бұрын
Sir kotlin-android-extension is now deprecated is it still the right way?
@StevdzaSan
@StevdzaSan 3 жыл бұрын
I made video about migrating from that plugin.
Android Parcelable или Serializable? Павел Борзиков @AvitoTech
24:01
Android Broadcast. Все об Андроид разработке
Рет қаралды 17 М.
Бутылка Air Up обмани мозг вкусом
01:00
Костя Павлов
Рет қаралды 2,5 МЛН
CHOCKY MILK.. 🤣 #shorts
00:20
Savage Vlogs
Рет қаралды 28 МЛН
Они так быстро убрались!
01:00
Аришнев
Рет қаралды 3,1 МЛН
Jetpack Compose Navigation for Beginners - Android Studio Tutorial
19:23
Philipp Lackner
Рет қаралды 140 М.
Differences Between Minecraft Java VS Bedrock
11:41
Skip the Tutorial
Рет қаралды 10 МЛН
Navigation Component in Android Studio using Kotlin | Android Knowledge
21:19
The ULTIMATE Guide to Sharing Data Between Screens in Jetpack Compose
24:08
Kotlin in 100 Seconds
2:22
Fireship
Рет қаралды 1,2 МЛН
What is a kernel - Gary explains
9:50
Android Authority
Рет қаралды 955 М.
The Truth About SIM Card Cloning
13:04
Janus Cycle
Рет қаралды 1,1 МЛН
Бутылка Air Up обмани мозг вкусом
01:00
Костя Павлов
Рет қаралды 2,5 МЛН