Changes

Jump to: navigation, search
Passing Arguments
The main drawback to this particular approach is that it is not “type safe”. In other words, if the receiving destination treats an argument as being a different type than it was declared (for example treating a string as an integer) this error will not be caught by the compiler and will likely cause problems at runtime.
A better option, and the one used in this book is to make use of safeargs. Safeargs is an plugin for the Android Studio Gradle build system which automatically generates special classes that allow arguments to be passed in a type safe way. The safeargs approach to argument passing will be described and demonstrated in the next chapter ([[An Android Jetpack Navigation Component Tutorial]]).
== Summary ==

Navigation menu