Fixed
Status Update
Comments
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
il...@google.com <il...@google.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
b9...@gmail.com <b9...@gmail.com> #4
il...@google.com <il...@google.com> #5
Replace <fragment> with FragmentContainerView. As per this tweet (https://twitter.com/ianhlake/status/1182006577261268993 ), we'll be updating documentation across d.android.com after this release goes stable.
11...@gmail.com <11...@gmail.com> #6
I've tried this fix and failed; Got it working after replacing `android:name="androidx.navigation.fragment.NavHostFragment"` with my start destination fragments' name.
Is this the intended way of using `FragmentContainerView` with navigation? Or am I confused(as per usu...)?
Thanks,
Jon.
Is this the intended way of using `FragmentContainerView` with navigation? Or am I confused(as per usu...)?
Thanks,
Jon.
11...@gmail.com <11...@gmail.com> #7
Scratch my comment.
Changing the name attr only "works" for a single fragment activity. Sorry.
I ended up reverting back to <fragment/> for now.
Changing the name attr only "works" for a single fragment activity. Sorry.
I ended up reverting back to <fragment/> for now.
il...@google.com <il...@google.com> #8
We're tracking a bug with FragmentContainerView with parsing attributes not working, something that NavHostFragment in particular requires.
Feel free to starhttps://issuetracker.google.com/issues/142421837 to track progress on the fix (and for now just continue to use <fragment> for those cases).
Feel free to star
bi...@mail.de <bi...@mail.de> #9
Please only suggest the lint fix if the <fragment> is inside a FrameLayout and/xor is the only child of the parent layout.
In my case I want to inflate a Fragment provided by some lib in my in some nested LinearLayout and the replacement doesn't make sense at all in this case.
il...@google.com <il...@google.com> #10
Re #9 - You should always, always inflate a fragment into a FragmentContainerView
. There is no exception where you should continue to use <fragment>
. You can, of course, put your FragmentContainerView
in any layout you want, LinearLayout
or otherwise.
Description
Version used: 1.2.0-alpha02
Once FragmentContainerView supports android:name (from