Fixed
Status Update
Comments
il...@google.com <il...@google.com>
il...@google.com <il...@google.com> #2
This has been fixed internally by https://android-review.googlesource.com/864732 and developers can now use by navArgs() in both activities and Fragments to retrieve an instance of their generated Args class.
As a side effect of this change, the Args.fromBundle(Bundle) methods have been replaced with constructors that take a Bundle.
As a side effect of this change, the Args.fromBundle(Bundle) methods have been replaced with constructors that take a Bundle.
il...@google.com <il...@google.com> #3
This will be part of the Navigation 1.0.0-alpha10 release.
il...@google.com <il...@google.com> #4
FWIW, the second part of #2, where we switched to a constructor that takes a Bundle, has been reverted in https://android-review.googlesource.com/870691 and we'll continue to use an Args.fromBundle(Bundle) static method in Navigation 1.0.0-alpha10.
Description
Version used: 1.0.0-alpha09
Would be nice to have an easier way to access the Args class since the getArguments() of a Fragment or getIntent().getExtras() of an Activity aren't available at construction time, meaning you need to use a lazy property delgate.
Wrapping that up in a type safe way that works with the generated Args classes would be greatly preferable.