目录
通过自定义广播的形式将系统的状态栏,导航栏显示隐藏,分别控制,也可以在配置文件中默认设置显示隐藏。
(效果图)
1.添加Intent广播
frameworks/base/core/java/android/content/Intent.java
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION
@BroadcastBehavior(includeBackground = true)
public static final String ACTION_BOOT_COMPLETED = "android.intent.action.BOOT_COMPLETED";
+ /**
+ * Broadcast Action:navigation bar hidden
+ * @hide
+ */
+ public static final String ACTION_SHOWHIDE_NAVIGATIONBAR = "android.receive.navigation.bar";