search

Home  >  Q&A  >  body text

android - 使用add和hide切换fragment时使用addToBackStack后,第一次切换并返回成功,第二次切换显示空白页?

这种问题该怎么解决,不想用replace。

怪我咯怪我咯2772 days ago1184

reply all(2)I'll reply

  • 阿神

    阿神2017-04-17 17:36:06

    replace requires addToBackStack add and hide, then the fragment still exists, so addToStack is not needed. I don’t know if my understanding is correct.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 17:36:06

    1. How many fragments are there

    2. viewpager sets the number of cached interfaces, setOffscreenPageLimit

    reply
    0
  • Cancelreply