tezvyn:

How to pass data between Fragments with Jetpack Navigation?

Source: developer.android.combeginner

This tests your knowledge of type-safe argument passing in Jetpack Navigation. A good answer defines the argument in XML, uses the Safe Args plugin to generate code, passes data via the Directions class, and retrieves it with the Args class.

This tests your understanding of the modern, type-safe way to pass arguments between destinations using the Jetpack Navigation component, specifically the Safe Args Gradle plugin. A great answer outlines four steps: add the argument to the destination in your navigation graph XML, apply the Safe Args plugin, use the generated NavDirections object to pass the data, and finally, retrieve it in the destination using the generated Args class.

Read the original → developer.android.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

How to pass data between Fragments with Jetpack Navigation? · Tezvyn