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<MyDestFragmentArgs>()
// later in code access properties from args
username = myArgs.username
I see that MySourceFragmentDirections
was generated so I assume the plugin is used correctly. I tried cleaning and rebuilding the project in Android Studio but don't see any *Args classes generated.
My nav_graph.xml
contains:
<fragment
android:id="@+id/mySourceFragment"
android:name="com.example.MySourceFragment"
android:label="@string/nav_title_source"
tools:layout="@layout/source_fragment">
<action
android:id="@+id/action_to_dest"
app:destination="@id/myDestFragment">
<argument
android:name="username"
app:argType="string" />
</action>
</fragment>