草庐IT

commitNow

全部标签

android - 新的 FragmentTransaction commitNow() 在内部如何工作?

新的commitNow()AndroidN中添加的方法和支持库版本24的文档有限且有点困惑。Commitsthistransactionsynchronously.Anyaddedfragmentswillbeinitializedandbroughtcompletelytothelifecyclestateoftheirhostandanyremovedfragmentswillbetorndownaccordinglybeforethiscallreturns.Committingatransactioninthiswayallowsfragmentstobeaddedasdedi

android - 新的 FragmentTransaction commitNow() 在内部如何工作?

新的commitNow()AndroidN中添加的方法和支持库版本24的文档有限且有点困惑。Commitsthistransactionsynchronously.Anyaddedfragmentswillbeinitializedandbroughtcompletelytothelifecyclestateoftheirhostandanyremovedfragmentswillbetorndownaccordinglybeforethiscallreturns.Committingatransactioninthiswayallowsfragmentstobeaddedasdedi