Questions tagged [android-safe-args]

144 questions
0
votes
1 answer

Android - Pass Argument with safe args

In an activity two fragments are passing some string when switching. Lobby Fragment button.setOnClickListener { LobbyFragmentDirections.actionLobbyFToGameF(myTitle) findNavController(requireActivity(),…
Foxhunt
  • 764
  • 1
  • 9
  • 23
0
votes
1 answer

Navigation Component pass args type BigDecimal

As the title described, I want to pass BigDecimal type argument between the fragments while navigation. But I can't find the support of BigDecimal type. Here is the link of the supported types from google document support types Any way to achieve…
William Hu
  • 15,423
  • 11
  • 100
  • 121
0
votes
2 answers

Navigation action/destination /action_creditTabFragment_to_needHelpFragment cannot be found from the current destination Destination(creditFragment)

My app uses navigation component, I have CreditFragment and it uses TabLayout with ViewPager2, it contains CreditTabFragment, when I am at the CreditTabFragment I want to navigate to NeedHelpFragment using findNavController(). How can I make the…
0
votes
1 answer

The problem that the Safe Args's argument continues to remain when switching screens

I use Navigation to switch screens. Move to B fragment on the A fragment screen of the bottom Write menu. Arguments are also passed while returning back using Safe Args from the moved screen B. In this state, if i move to another bottom menu and…
ybybyb
  • 1,385
  • 1
  • 12
  • 33
0
votes
1 answer

Passing data between dynamic feature modules using Navigation Component

I recently started exploring Dynamic Feature Modules in android. I just figured how to navigate between modules using navigation component but i can't figure out or find any resources/guide on how to pass data as arguments between modules using safe…
0
votes
2 answers

Passing args in kotlin using safe args plugin

I want to pass args by safe args in kotlin (android studio). No matter what I try I am always getting this error in onCreateView. Require arguments are in red. On alt+enter it wants to create new function but that is not what I need. Does anyone…
0
votes
1 answer

Obfuscation with ProGuard and NavigationComponent Safe Args

I'm trying to shrink my app size with the R8 compiler and the Proguard Rules. The problem is that the Safe Args extension uses reflection in NavArgsLazy.kt like so: override val value: Args get() { var args = cached …
0
votes
1 answer

Move SafeArgs in multi module project

I im working on modularizationing android project. I im using Navigation Component library. I have main nav_graph.xml in :app module. I want to move generated SafeArgs files to modules directories. I didnt add androidx.navigation.safeargs.kotlin…
Tooto
  • 375
  • 2
  • 15
0
votes
0 answers

NoSuchMethodError on jetpack navigation (safeargs)

I encountered an error when trying to generate a navigation action (generated by the safeargs gradle plugin). Source and target fragments are both bottomsheetdialogfragments and therefore registered as dialogs in the corresponding navigation…
0
votes
1 answer

Android Navigation Safe Args Pass LiveData and Lambda Variable

I have two questions for a simple Fragment A -> Fragment B graph: Can I pass LiveData using safe args? If not, how can I listen the value changes in Fragment B from Fragment A? Can I pass lambda varible (function) using safe args (to act like a…
0
votes
2 answers

Update an argument of a basic navigation drawer activity

The context: I want to pass a userId to a fragment UserFragment after he has logged in. I use a new project Android type "Navigation drawer activity". I use LiveData, so when the user is logged in, the observer of my livedata updates the idUser from…
0
votes
0 answers

Pass data back to the previous Fragment by Safe Args. How is it possible?

In my app I have one Activity and the rest are fragments. Right now I am trying to get run as follows. Let's say, I have Fragments A (Home), B, and C. The scenario is this: I navigate from A to B that shows me some data that I pass from A by Safe…
Mark Delphi
  • 1,376
  • 1
  • 11
  • 29
0
votes
0 answers

To many arguments when using android navigation safeArgs

i am creating navigation graph in android, and i give args for the destination, but when I called the function, it was saying too many arguments. already setup on build.gradle (app) apply plugin: 'androidx.navigation.safeargs' already setup on…
0
votes
2 answers

How to navigate using SafeArgs

I just started to use the Jetpack Navigation components and SafeArgs for navigation in Android. However, I do not understand how I can navigate from one destination to another one (I read the google documentation but this was confusing for me). So I…
VanessaF
  • 515
  • 11
  • 36
0
votes
1 answer

Is it possible to not to pass safeArgs for some condition

I am working on an application where I have to implement Add and edit functionality. I am using a fragment to which I am passing a safearg which works fine for the edit mode as I pass the args but it crashes for the add mode as this time I do not…
1 2 3
9
10