- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我一直在上下搜索如何在 Android 平板电脑上隐藏状态栏。我知道除非您对平板电脑进行 root,否则不可能这样做。
我遇到的主要问题是,当我在我的应用程序上写字时,会弹出 wi-fi 部分。
我知道标志 View.SYSTEM_UI_FLAG_HIDE_NAVIGATION 或 SYSTEM_UI_FLAG_LOW_PROFILE隐藏导航/模糊导航。
我需要的是:Gallery 应用程序(内置于 android)中有一个功能,可让您遍历图像,并且仅在单点触摸时弹出导航并在单点触摸时隐藏。没有其他手势触发此栏。
我需要一些方法来实现类似的东西。
如果有人能指出正确的方向,我将不胜感激。
详细信息:
平板电脑:三星 Galaxy Note 10.1安卓版本:4.1.2
最佳答案
实际上在 4+ Android 版本的平板电脑中是不可能隐藏它的,但你可以尝试像 this 那样做。 :
The SYSTEM_UI_FLAG_LOW_PROFILE flag replaces the STATUS_BAR_HIDDEN flag. When set, this flag enables “low profile" mode for the system bar or navigation bar. Navigation buttons dim and other elements in the system bar also hide. Enabling this is useful for creating more immersive games without distraction for the system navigation buttons.
The SYSTEM_UI_FLAG_VISIBLE flag replaces the STATUS_BAR_VISIBLE flag to request the system bar or navigation bar be visible.
The SYSTEM_UI_FLAG_HIDE_NAVIGATION is a new flag that requests the navigation bar hide completely. Be aware that this works only for the navigation bar used by some handsets (it does not hide the system bar on tablets). The navigation bar returns to view as soon as the system receives user input. As such, this mode is useful primarily for video playback or other cases in which the whole screen is needed but user input is not required. You can set each of these flags for the system bar and navigation bar by calling setSystemUiVisibility() on any view in your activity. The window manager combines (OR-together) all flags from all views in your window and apply them to the system UI as long as your window has input focus. When your window loses input focus (the user navigates away from your app, or a dialog appears), your flags cease to have effect. Similarly, if you remove those views from the view hierarchy their flags no longer apply.
我找到的另一个解决方案是像这样为您的布局 View 提供服务:
yourView.setSystemUiVisibility(8);
他们说它适用于平板电脑,但我还没有真正尝试过。
另一个正在添加this方法并根据您要显示的内容传递 True 或 False:
void setNavVisibility(boolean visible) {
int newVis = mBaseSystemUiVisibility;
if (!visible) {
newVis |= SYSTEM_UI_FLAG_LOW_PROFILE | SYSTEM_UI_FLAG_FULLSCREEN;
}
final boolean changed = newVis == getSystemUiVisibility();
// Unschedule any pending event to hide navigation if we are
// changing the visibility, or making the UI visible.
if (changed || visible) {
Handler h = getHandler();
if (h != null) {
h.removeCallbacks(mNavHider);
}
}
// Set the new desired visibility.
setSystemUiVisibility(newVis);
mTitleView.setVisibility(visible ? VISIBLE : INVISIBLE);
mSeekView.setVisibility(visible ? VISIBLE : INVISIBLE);
}
关于Android 平板电脑 - 触摸时隐藏/显示状态栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18653783/
我正在为大约 80 位用户开发 Word VBA 宏应用程序。办公室人员流动率高,因此培训受到影响,因此该项目的 self 强加要求之一是全面、友好的文档。然而,为了补充这一点,并且为了避免新手在尝试
我想在我的应用程序中隐藏状态栏 (Syste UI),并且我想始终显示导航栏。从 android 开发人员文档中,我得到了这个代码来获得全屏。 int uiOptions = View.SYSTEM_
我正在尝试将 splitview Controller 添加为 subview Controller 。父 View Controller 是导航 Controller 。父 View Control
是否可以隐藏括号中的底部面板?左侧有行和列,右侧有可能的错误消息、语言和一些其他详细信息。 我真的很喜欢 Brackets 代码编辑器,但不幸的是我必须在相当小的屏幕上工作,并且底部面板浪费了宝贵的空
我有一个类似于照片应用程序的应用程序,当显示图片时,它会占据整个 320x480 的屏幕。也像照片应用一样,当用户点击屏幕时,状态栏/导航栏会淡出以提供额外的空间。一切正常,除了我注意到一个奇怪的故障
有人知道如何在新 Facebook 中找到状态栏的好教程吗?底部的那个。看起来真的很酷 我以为它是用 ajax 或 jquery 编写的。但不确定。 最佳答案 以下是一些可能对您有帮助的有用链接/插件
我有一个 php 脚本,我试图将状态类型汇总到变量中。例如,当我执行以下操作时: echo $val['status']; 我得到: New New New Dead In Process New N
这个问题在这里已经有了答案: How to change Status Bar text color in iOS (59 个答案) 关闭 7 年前。 我尝试更改 IOS 应用程序的样式。使用以下方
我正在将我的 searchController 添加到我当前的 Controller ,当我使用 xcode 5.1.1 时它工作正常,但是当我升级到 xcode 6 时,它给我带来了问题。我注意到它
有没有一种方法可以像在 Windows 应用程序中那样在 SWT 中创建原生状态栏: 我见过使用标签模拟的状态栏,但我对真正的解决方案更感兴趣。 最佳答案 org.eclipse.jface.acti
有一个包含一些数字列的网格,需要为每个列实现一个聚合(总和或计数)并将其显示在相应的列下。 我知道一些套件(DevExpress 或其他)已经“默认”实现。但是有办法使用默认控件或 JVCL 来实现吗
我比较陌生,所以我不知道为什么我的应用栏看起来像这样 这是main.dart文件 import 'package:testapp/test_page.dart'; import 'package:fl
我已经设置了线条、矩形和椭圆形,但我有一个问题。 如何使我的线条、椭圆形和矩形在 main 方法中可见?由于某种原因,当我编译和运行文件时它们没有被输出......谢谢 import java.aw
我想在闪屏中隐藏状态栏并显示给 viewController与白色。 我为此做了以下工作: 在 YES 中添加了“状态栏最初是隐藏的”在 info.plist . 在 –(BOOL)applicati
我想为我的用户实现一种关于进度状态的信息。我发现了几个组件,例如: Richfaces status或 IceFaces onnection Status 所以,我想在我的页面中添加类似的东西,特别是
我有一个弹出窗口,弹出窗口内部是一个相机按钮,我的相机工作正常,但顶部的电池符号与相机重叠,下面是屏幕截图。 如果有人知道答案,我们将不胜感激。 最佳答案 您可以隐藏该 View 的状态栏,这样它就不
所以我现在有一个 ExecutorService 成功地阻塞并线性运行。我的麻烦是,我正在尝试添加状态更新,但我不知道如何让 Futures 一次结算一个项目。似乎当我的 Future<> 中的第一项
纽约时报 Android 应用程序在顶部有一个类似于通知栏的东西。 我怀疑这是一个包含 TextView 的布局。问题是他们设法将标题拖下以显示头条新闻。 任何人都可以提供有关如何复制它的任何见解吗?
我这辈子都不知道如何去掉应用程序顶部的白条。 http://cl.ly/image/3Z2I1x0H3H17 我目前使用导航 Controller 作为 Root View 。我也尝试过将 UIVie
我有一个我想全屏的应用程序,但我尝试过的每个解决方案,状态栏都是白色的,并且应用程序没有全屏运行。 如何隐藏状态栏? 最佳答案 从 2016 年开始唯一正确的解决方案: 在您的应用程序 plist 文
我是一名优秀的程序员,十分优秀!