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

preview_player
Показать описание
🏆 My Online Courses
⭐Discount Coupon: LAUNCH-STEVDZA-SAN

🐱‍👤 Wanna become a member? Join!

📸 Instagram

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! :)
Рекомендации по теме
Комментарии
Автор

saved my hours of code, i cound parcelise my data earlier thanks to this video, saved my code

jaskarandeepsingh
Автор

saved my day. also worked with passing List data . perfect.

AmitSharmaplus
Автор

Thank you for existing. Keep up the good work my friend. I learned a lot from this series!!

Oliver
Автор

@parcelized in deprecated is there a new way instead if implanting the interface?

abdelazizkhalid
Автор

I wish I could give you more than one like!! You just earned a new subscriber

atila_tv
Автор

How did you add the back button in the toolbar on the second fragment only?

ArsenAl-zorK
Автор

works great just needed to add id 'kotlin-parcelize' in app build.gradle file as one kotlin android extensions is deprecated

Anuuurag
Автор

godness, the direction will appear after rebuilding :"< luckily that u talked about it, ty so much <#

ngocanho
Автор

What is the difference between Pacelizable and Serilizable

michaelwright
Автор

so how do we send protobuf java files as parameters with nav arg

salihyucell
Автор

So if I want to send ArrayList<User>, I have to choose array option in the add argument window along with everything else you mentioned in the video, is it ?

sumukhaithal
Автор

do i have to add this plugin or is the safeArgs sufficient ?plugins {
id("kotlin-parcelize")
}

julesruzindana-rukundo
Автор

Who has error "Unsolved reference" with @Parcelize annotation - you just need to apply plugin 'kotlin-parcelize' in project graddle

azazovsky
Автор

Really good series thank you.
Can you do something with MVVM and Coroutines?

emmanuelpregnolato
Автор

Would you be able to use this method to save data from Fragment A and pass it on to say Fragment C?

alfredowusu
Автор

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?

milamarinkovic
Автор

How can we get data from Fragment B to Fragment A by this method...?

hdkloh
Автор

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."




could you please give some feedback regarding your experiences with it?
Thank you.

Effectivebasketball
Автор

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....

anudeepananth
Автор

Sir kotlin-android-extension is now deprecated is it still the right way?

anmolsharma
join shbcf.ru