Using FragmentContainerView with Navigation component?

前端 未结 3 1551
暖寄归人
暖寄归人 2021-01-31 14:05

After updating to Navigation 2.2.0-beta01 from the previous version, lint gives a warning about replacing the tag with FragmentContainerView<

3条回答
  •  长发绾君心
    2021-01-31 14:45

    Important! There are known issues with different versions of FragmentContainerView. See the changelog before using. Read through bug fixes and use a recent version of the library.


    For now, you should also declare dependency on Fragment 1.2.0-beta02 as it includes a fix for this use case.

    implementation "androidx.fragment:fragment:1.2.0-beta02"
    

    Version 1.2.0-beta02

    October 11, 2019

    Bug fixes

    Fixed an issue where Fragment's onInflate() did not receive proper attributes from FragmentContainerView, breaking cases such as NavHostFragment. (b/142421837)

    Source: https://developer.android.com/jetpack/androidx/releases/fragment#1.2.0-beta02

提交回复
热议问题