search

Home  >  Q&A  >  body text

android - 安卓APP退到后台后重新进入,底部tab切换失效

1、APP正常启动后,底部tab切换界面是没问题。
2、例如当前页面是首页,返回桌面,再进入后,底部tab切换失效了。切换的动作正常执行(调接口等操作正常运行),但界面一直留在首页。

伊谢尔伦伊谢尔伦2802 days ago787

reply all(5)I'll reply

  • ringa_lee

    ringa_lee2017-04-17 17:21:09

    1. Write a method, call it in onstop, save the current page cache when exiting, and just do it in onResum.
    2. In onResume, reload the layout, especially the content that uses adapters or background data filling. Need to redraw.
    3.Static

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:21:09

    There must be a bug somewhere in the code, let’s debug it carefully.

    reply
    0
  • 黄舟

    黄舟2017-04-17 17:21:09

    It’s best to post your implementation code. I can’t imagine where your problem lies.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:21:09

    You can pay attention to two points: static variables and fragments with parameters. If the above are used, problems will occur when the application is recycled and rebuilt.

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 17:21:09

    It feels like I don’t want to be recycled either

    reply
    0
  • Cancelreply