Blankj/AndroidUtilCode

FragmentUtils 增加 fragmentTransaction.setMaxLifecycle 支持

Ouverte

#1 540 ouverte le 6 sept. 2021

 (0 commentaire) (0 réaction) (1 personne assignée)Java (10 620 forks)batch import
help wanted

Métriques du dépôt

Stars
 (33 635 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Androidx Fragment 通过Add() Hide() 方式实现懒加载

在调用 add 或 show 方法后,setMaxLifecycle(showFragment, Lifecycle.State.RESUMED)

在调用 hide 方法后,setMaxLifecycle(fragment, Lifecycle.State.STARTED)

建议 增加fragmentTransaction.setMaxLifecycle 支持

Guide contributeur