Using FragmentContainerView with Navigation component?

前端 未结 3 1552
暖寄归人
暖寄归人 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:31

    The NavigationBasicSample has been updated to 2.2.0-alpha01 but is still using the fragment tag. The NavigationAdvancedSample shows the use of the FragmentContainerView, but the nav graph is inflated in the code (they have several different graphs) and the corresponding host fragment is added to the FragmentContainerView. So I'd say at this time we should ignore the warning if we want automatic inflation.

提交回复
热议问题