Android Fragment - move from one View to another?

后端 未结 6 522
有刺的猬
有刺的猬 2020-12-16 18:04

Can i first add a Fragment to a View, then \"detach\" it, and then \"re-attach\" it to another View?

In code, i want to:

fragOne one = new fragOne();         


        
6条回答
  •  半阙折子戏
    2020-12-16 18:24

    Adding to the Yan. Yurkin's answer. Make sure not to have any transitions applied to the transaction as these seem to delay the fragment from being detached.

提交回复
热议问题