adb 實現沉浸式狀態欄 導航欄
adb shell settings put global policy_control immersive.full=*
沉浸狀態欄:
adb shell settings put global policy_control immersive.status=*
沉浸導航欄:
adb shell settings put global policy_control immersive.navigation=*
我們還可以單獨控制哪些app不沉浸,例如以下代碼設置google即時桌面不沉浸,其他程序沉浸:
adb shell settings put global policy_control immersive.full=apps,-com.google.android.googlequicksearchbox
如果想恢復到正常模式,運行下面的代碼:
adb shell settings put global policy_control null