步骤: 源码/frameworks/base/policy/src/com/android/internal/policy/impl目录下修改PhoneWindowManager.java文件. 修改方法: 定位到setInitialDisplaySize函数,找到注释 // Height of thenavigation bar when presented horizontally at bottom 将注解下的源代码修改为: mNavigationBarHeightForRotation[…
Google的官方文档是: https://developer.android.com/training/system-ui/navigation.html#behind 示例代码 1 View decorView = getWindow().getDecorView(); 2 // Hide both the navigation bar and the status bar. 3 // SYSTEM_UI_FLAG_FULLSCREEN is only available on Androi…
iOS 7 以后,之前隐藏顶部状态栏的方法都已经失效.以下介绍的方法是全部兼容的. 修改xode工程里的 Info.plist 增加 Status bar is initially hidden一行,选择为 YES, 还需增加 View controller-based status bar appearance 一行,选择为 NO. 如果要根据viewcontroller来自主控制显示和隐藏,那么View controller-based status bar appearance 一行,选择…