Nested fragments disappear during transition animation

后端 未结 16 1721
广开言路
广开言路 2020-11-29 15:50

Here\'s the scenario: Activity contains fragment A, which in turn uses getChildFragmentManager() to add fragments A1 and A2

16条回答
  •  再見小時候
    2020-11-29 16:16

    A simple way to fix this problem is use the Fragment class from this library instead of the standard library fragment class:

    https://github.com/marksalpeter/contract-fragment

    As a side note, the package also contains a useful delegate pattern called ContractFragment that you might find useful for building your apps leveraging the parent-child fragment relationship.

提交回复
热议问题