The difference between Android Immersive Status Bar and Transparent Status Bar 20

Updated on number 2024-05-05
3 answers
  1. Anonymous users2024-02-09

    New features that are only supported above the Immersive Notification Bar. Not supported. Here's how it works:

    1.Create a new public style and set android:fitssystemwindows=truetrue2

    Modify, so that all activity styles are set to appbasetheme by default (*Different projects should be handled flexibly, the activity styles of the author's project are unified, so this setting is no problem, but in reality, different activities may call different styles, and readers need to set them according to their own projects) 3.The implementation class of immersive notification bar has been added, and the implementation principle is very simple. 1) Judge whether the current system version is above, and judge ** as follows:

    if(>=version If it is greater than, set the status bar to be transparent, ** as follows:,; 3) Get the root rootview of the activity (decorview), then create a new viewStateBarView and add it to the rootview (here manually set an ID for it, the next time you come in, first determine whether the rootview has created a statebarview, if it has been created, then directly get the view so that you can prevent repeated creation, resulting in memory leak).

  2. Anonymous users2024-02-08

    Immersion is gone, transparency doesn't need to be explained.

  3. Anonymous users2024-02-07

    New features that are only supported above the Immersive Notification Bar. Not supported.

    Here's how it works:

    1.Create a new public style and set android:fitssystemwindows=true

    2.Modify, so that all activity styles are set to appbasetheme by default (*Different projects should be handled flexibly, and the activity styles of the pen wheel missing projects are uniform, so there is no problem with this setting, but in actual situations, different activities may call different styles, and readers need to set them according to their own projects).

    3.Added the implementation class of immersive notification bar macro cover, and the implementation principle is very simple.

    1) Judge whether the current system version is above, and judge ** as follows:

    if ( =version_

    2) If it is greater than that, set the status bar to be transparent, ** as follows:

    3) Get the root rootview of the activity (decorview), then create a new viewStateBarView and add it to the rootview (here manually set an ID for it, the next time you come in, first determine whether the rootview has created a statebarview, if it has been created, then directly get the view so that you can prevent repeated creation, resulting in memory leak).

Related questions
23 answers2024-05-05

..See for yourself inside the menu.

12 answers2024-05-05

a) Principle.

1. Minimization principle: first hide the window, and then draw the icon in the lower right corner. >>>More

4 answers2024-05-05

Fix the system with 360 Security Guard!

23 answers2024-05-05

If you can't find the screen recording feature on your phone, we recommend that you follow these steps: >>>More

10 answers2024-05-05

Go to the local contact after-sales service to reinstall the system, and the after-sales location can be found online.