Questions tagged [android-safe-args]
144 questions
0
votes
1 answer
Is it possible to pass data while navigating up in android
I have two fragments A and B. I'm trying to navigate to B and then back to A. While doing this, I have some form data (a bunch of text fields) in A which I'd like to preserve while navigating back and forth to B. When I navigateUp() from B, the data…

Anirudh Ganesh
- 446
- 4
- 22
0
votes
1 answer
Error:Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'navigationVersion'
I get this error when make two changes
first, add the following dependency in my build.gradle file
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$version_kotlin"
…

almost_done
- 3
- 1
- 3
0
votes
1 answer
Nav Direction class not getting updated when safe args is added
I am trying to pass an argument from one fragment to another while navigating and followed the instructions as per https://developer.android.com/guide/navigation/navigation-pass-data
I have been using safeargs for some time in the project now, so…

Anirudh Ganesh
- 446
- 4
- 22
0
votes
1 answer
Pass arguments to Nav Host Fragment
Lets say I have a fragment flow defined by my nav graph using the Navigation Components and the safe-args plugin.
How do I pass arguments to my nav host fragment?

Palm
- 699
- 1
- 6
- 17
0
votes
1 answer
android studio when I try add dependency into the project Gradle file I get this error
dependencies {
…
"android.arch.navigation:navigation-safe-args-gradle-plugin:$version_navigation"
}
I get this error :
Caused by: groovy.lang.MissingPropertyException: Could not get unknown property version_navigation for object of type…

HALDUN
- 3
- 5
0
votes
1 answer
SafeArgs does not get generated
I am using navigation components but cannot get the Args class generated so I can use it in my destination Fragment the following way:
private val myArgs by navArgs()
// later in code access properties from args
username =…

liminal
- 1,144
- 2
- 13
- 24
0
votes
4 answers
Passing argument from fragment to activity using SafeArgs
Using navigation graph, when i navigate from fragment to activity and also passing argument using safeargs, in activity, I cannot get argument. How can I get argument passing from fragment???
In fragment, I can get argument by getArgument()…

Danh Danh
- 3
- 1
- 6
0
votes
0 answers
Android DataBindingUtil.inflate causes InvocationTargetException
I'm working on an android application that registers consumptions of materials for production in warehouses. I am using Androids UI Navigation architecture component to handle the navigation within the app.
In every Fragment I am using the same…

Fabian Fahrenholz
- 35
- 1
- 5
0
votes
1 answer
How to use Safeargs in multi-module architecture (Java)?
How can I use Java and Safeargs in any or all modules of my app??
I have a multi-module setup for my app. If I use Kotlin for the modules Safeargs works fine in all modules. But if I switch the language to Java. If I remove Safeargs plugin from…

thanatos
- 1
- 1