search

Home  >  Q&A  >  body text

android - activity 多个fragment,需要有不同的状态栏

我的一个MainActivity中有5个fragment,其中一个fragment需求是无导航栏,状态栏需要和背景图片一致,如QQ中QQ空间界面,请问怎么实现呢?

PHP中文网PHP中文网2772 days ago605

reply all(3)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 14:59:29

    In Activity, you can change the display style of the status bar by modifying the properties of the Window. If you have such needs, you should also change the display style of the status bar when switching to this Fragment.
    However, most mobile phones have animations for switching the status bar. It is best not to frequently switch the status bar display mode in the program, but to use the same status bar method in all interfaces.

    reply
    0
  • PHPz

    PHPz2017-04-17 14:59:29

    The activity is set to have no navigation bar, and fragment is used to implement it.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 14:59:29

    If there is only one Fragment that needs to be operated, it is the same as QQ Space.
    I created a new Activity and set it to have no navigation bar. Then manually implement the content changes yourself.

    reply
    0
  • Cancelreply