- 浏览: 416719 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (255)
- Android (53)
- java (57)
- javascript (7)
- linux (19)
- springside3 (6)
- spring (2)
- struts2 (11)
- hibernate (2)
- jsp&servlet (15)
- jquery (1)
- ExtJs (5)
- freemarker (1)
- apache (5)
- mysql (3)
- tomcat (3)
- eclipse&maven (23)
- 电脑小技巧 (1)
- 配置安装 (3)
- 开源框架 (2)
- 设计模式 (2)
- 架构 (2)
- ajax (1)
- 正则表达式 (7)
- 测试 (2)
- 装修 (1)
- 不错的软件 (4)
- http协议 (2)
- 网络 (2)
- windows (2)
- nodejs (1)
最新评论
-
yhyx:
好
JAVA URI URL区别 -
dingbuoyi:
我文章很早以前写的啊 估计软件版本早更新了 你要自己研究一下
windows下Sublime Text 2开发 Nodejs -
di1984HIT:
写的很好,学习了
【转帖】IP网段的计算和划分 -
农民柏柏:
感谢分享
【转】Android实现人人网点击“+”弹出效果 -
lianwanf:
大神,求源码,很想要那jar包.官方的不懂下载啊.谢谢啊. ...
开源框架ignition[二]
一 全部隐藏
可以试下
<uses-sdk android:minSdkVersion="15" />或者targetVersion=15
版本号可以对应你的手机的ROM的系统版本
二 部分隐藏
在VIEW对象上调用setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
Controls for system UI visibility
Since the early days of Android, the system has managed a UI component known as the status bar, which resides at the top of handset devices to deliver information such as the carrier signal, time, notifications, and so on. Android 3.0 added the system bar for tablet devices, which resides at the bottom of the screen to provide system navigation controls (Home, Back, and so forth) and also an interface for elements traditionally provided by the status bar. In Android 4.0, the system provides a new type of system UI called the navigation bar. You might consider the navigation bar a re-tuned version of the system bar designed for handsets—it provides navigation controls for devices that don’t have hardware counterparts for navigating the system, but it leaves out the system bar's notification UI and setting controls. As such, a device that provides the navigation bar also has the status bar at the top.
To this day, you can hide the status bar on handsets using the FLAG_FULLSCREEN flag. In Android 4.0, the APIs that control the system bar’s visibility have been updated to better reflect the behavior of both the system bar and navigation bar:
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.
To synchronize other events in your activity with visibility changes to the system UI (for example, hide the action bar or other UI controls when the system UI hides), you should register a View.OnSystemUiVisibilityChangeListener to be notified when the visibility of the system bar or navigation bar changes.
See the OverscanActivity class for a demonstration of different system UI options.
可以试下
<uses-sdk android:minSdkVersion="15" />或者targetVersion=15
版本号可以对应你的手机的ROM的系统版本
二 部分隐藏
在VIEW对象上调用setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
Controls for system UI visibility
Since the early days of Android, the system has managed a UI component known as the status bar, which resides at the top of handset devices to deliver information such as the carrier signal, time, notifications, and so on. Android 3.0 added the system bar for tablet devices, which resides at the bottom of the screen to provide system navigation controls (Home, Back, and so forth) and also an interface for elements traditionally provided by the status bar. In Android 4.0, the system provides a new type of system UI called the navigation bar. You might consider the navigation bar a re-tuned version of the system bar designed for handsets—it provides navigation controls for devices that don’t have hardware counterparts for navigating the system, but it leaves out the system bar's notification UI and setting controls. As such, a device that provides the navigation bar also has the status bar at the top.
To this day, you can hide the status bar on handsets using the FLAG_FULLSCREEN flag. In Android 4.0, the APIs that control the system bar’s visibility have been updated to better reflect the behavior of both the system bar and navigation bar:
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.
To synchronize other events in your activity with visibility changes to the system UI (for example, hide the action bar or other UI controls when the system UI hides), you should register a View.OnSystemUiVisibilityChangeListener to be notified when the visibility of the system bar or navigation bar changes.
See the OverscanActivity class for a demonstration of different system UI options.
import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; public class HideTestActivity extends Activity implements OnClickListener{ View main ; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); main = getLayoutInflater().from(this).inflate(R.layout.main, null); main.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); main.setOnClickListener(this); setContentView(main); } @Override public void onClick(View v) { int i = main.getSystemUiVisibility(); if (i == View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) { main.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE); } else if (i == View.SYSTEM_UI_FLAG_VISIBLE){ main.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE); } else if (i == View.SYSTEM_UI_FLAG_LOW_PROFILE) { main.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); } } }
发表评论
-
listview 几个重要属性
2012-06-20 06:54 1019参考资料 http://www.cnblogs ... -
android项目mvn开发
2012-06-19 07:12 975项目主页 http://code.google.com/p/m ... -
你真的会用AsyncTask吗
2012-06-24 19:24 1515一个典型的AsyncTask应用 public class ... -
关于AsyncTask的RejectedExecutionException异常
2012-06-24 19:24 3221当运行的AsyncTask 实例数量过多的时候会引发Rejec ... -
android.view.WindowManager$BadTokenException: Unable to add window -- token andr
2012-06-08 09:59 13104因为使用了AsyncTask 异步线程在线程完成以后的onPo ... -
ADT 17 导入JAR包
2012-06-07 17:48 1202引用 Eclipse ADT 17 以上版本用户,请在工程目录 ... -
android textview 自动链接网址 修改默认点击事件
2012-06-06 18:04 108141 修改XML文件即可,android:autoLink=&q ... -
【转】Android项目更换开发环境时出现的 java.lang.VerifyError 异常解决办法
2012-06-06 07:55 977引用 项目是从同事的电脑上直接拷贝过来的,项目里面的jar包是 ... -
android 判断Service是否开启
2012-05-31 10:12 3545被判断的Service 必须是带包名的全名 通过Servic ... -
android 写入收件箱
2012-05-21 10:58 859<uses-permission android: ... -
ndroid junit入门(四)Service测试
2012-05-18 11:26 808public class TestService exte ... -
android junit入门(五)@SmallTest@MediumTest@LargeTest
2012-05-18 11:00 4008原文http://googletesting.blogspot ... -
android junit入门(三)Application测试
2012-05-18 10:54 1148测试Application public class T ... -
android junit入门(二)Activity测试
2012-05-18 10:38 2368测试ACTIVITY 直接上类了 public clas ... -
android junit入门(一) JUNIT测试
2012-05-18 09:54 1366新建ANDROID TEST项目 ECLIPSE右键--> ... -
imagebutton 带文字
2012-05-16 13:59 928<FrameLayout ... -
android orm
2012-05-10 17:58 1008选择了http://ormlite.com/ 里面还支持AN ... -
android 切图
2012-05-03 15:19 14761 程序launcher icons规格 3 ... -
新浪微博API杂记
2012-05-02 17:14 9351 获取指定用户的微博 https://api.weibo.c ... -
获取新浪微博的ACCESS_TOKEN
2012-05-02 16:00 58201 https://api.weibo.com/oauth2/ ...
相关推荐
2. **隐藏虚拟按键**:在Android中,可以使用`WindowManager.LayoutParams`类来隐藏或显示虚拟按键。调用`getWindow().getDecorView()`获取到当前Activity的装饰视图,然后调用`setSystemUiVisibility()`方法,传入`...
要隐藏虚拟按键,我们可以使用 Android 提供的系统UIFlag来实现。系统UIFlag是 Android 中的一个标志位,它可以用来控制系统的UI行为。我们可以使用 View 的 setSystemUiVisibility 方法来设置系统UIFlag,从而隐藏...
//隐藏虚拟按键,并且全屏 if (Build.VERSION.SDK_INT > 11 && Build.VERSION.SDK_INT ) { // lower api View v = this.getWindow().getDecorView(); v.setSystemUiVisibility(View.GONE); } else if (Build....
- 在Activity的`onCreate()`方法中,获取到`Window`对象,并调用`setFlags()`方法,传递`SYSTEM_UI_FLAG_HIDE_NAVIGATION`标志,隐藏虚拟按键。 - 注意:隐藏后,用户可能无法快速返回主界面,因此需要监听`SYSTEM...
RK系列 Android系统隐藏工具栏虚拟按键Jar包
"Android隐藏手机底部虚拟按键的方法" Android 隐藏手机底部虚拟按键的方法是一种非常有用的技术,能够在我们的 Android 应用程序中隐藏底部虚拟按键,从而提供更加纯净的用户体验。下面我们将详细介绍这项技术,并...
【GMD自动隐藏虚拟按键专业版】是一款专为Android设备设计的应用程序,旨在提供更加纯净、无干扰的屏幕体验。该应用的主要功能是隐藏设备底部的系统导航栏,即我们通常所说的“虚拟按键”,如返回、主页和多任务键。...
本文将详细介绍如何在Android应用中实现隐藏虚拟按键的功能。 首先,我们需要了解API级别的差异,因为不同的Android版本处理隐藏虚拟按键的方式有所不同。从Android 3.0(API级别11)到4.4(API级别19),隐藏虚拟...
通过以上策略,开发者可以有效地解决Android应用在华为设备上的沉浸式状态栏与虚拟按键冲突问题,提供一致且良好的用户体验。在开发过程中,不断学习和掌握Android系统的特性和设备差异,是提升应用质量的关键。
在Android系统中,虚拟键盘(通常称为输入法)是用户与设备交互的重要组成部分。自定义Android虚拟键盘允许开发者根据特定需求或应用场景定制键盘布局、功能和样式,为用户提供更个性化的输入体验。以下是对自定义...
这行代码将隐藏虚拟按键,使得 Activity 全屏显示。 方法二:在 Dialog 中去除虚拟按键 在 Dialog 中,我们可以使用以下代码来去除虚拟按键: ```java mDialog.getWindow().getDecorView().setSystemUiVisibility...
4. 隐藏虚拟按键:虚拟按键,也称为导航栏,包括返回、主页和多任务按钮。使用以下命令可以隐藏虚拟按键: ``` adb shell input keyevent 82 ``` 这个命令模拟按下菜单键,从而隐藏虚拟按键。若要重新显示,...
4. **自定义手势**:Android系统允许开发者通过`WindowInsetsController`或`ViewCompat.setOnApplyWindowInsetsListener()`接口,自定义手势来控制虚拟按键的显示和隐藏。这使得在特定场景下,如播放视频时,能更好...
在开发使用Delphi XE 10.2的FireMonkey (FMX) 应用程序时,遇到的一个常见问题是:当用户在Android设备上输入时,弹出的虚拟键盘可能会遮挡输入焦点所在的控件。这给用户体验带来不便,但通过理解和应用正确的技术,...
`InputMethodManager`是Android系统提供的管理输入法的类,可以用来控制软键盘的显示和隐藏。虽然它不直接提供按键监听,但我们可以通过监听IME(Input Method Editor)的动作事件来间接实现监听。通过重写`Activity...
我们可以使用 `hideBottomUIMenu()` 方法来隐藏虚拟按键,并且实现全屏效果。该方法可以根据 Android 版本进行判断,以便在不同版本的 Android 系统中都能正常工作。 虚拟按键的原理 Android 虚拟按键是 Android ...
在安卓P(Android P)系统中,动态隐藏虚拟按键是一项重要的功能优化,它允许开发者或者用户根据应用的需求或个人偏好来控制导航栏的可见性。这项功能主要涉及到系统的UI交互和自定义设置,提升了用户体验,特别是在...