Just made a simplified package, which saves you the need to control replace and other related codes. In addition, direct replacement is not a friendly operation method, and the effect is not ideal.
However, FragmentTabHost doesn’t seem to be used by many people, and it is an out-of-season product.
fragmenttabhost will call the oncreate method in the fragment life cycle every time it switches fragments. Not ideal. It is recommended that viewpaget+fragment has many aspects that we can control, such as initializing and loading several fragments.
Just made a simplified package, which saves you the need to control replace and other related codes. In addition, direct replacement is not a friendly operation method, and the effect is not ideal.
However, FragmentTabHost doesn’t seem to be used by many people, and it is an out-of-season product.
fragmenttabhost will call the oncreate method in the fragment life cycle every time it switches fragments. Not ideal. It is recommended that viewpaget+fragment has many aspects that we can control, such as initializing and loading several fragments.