Archos 101 互联网平板电脑:是否可以隐藏默认的 Android(软件)按钮
我正在为 Archos 101 Android 平板电脑开发 Android 应用程序(链接:http:// /www.archos.com/products/ta/archos_101it/index.html)。该平板电脑运行 Android 2.2,如您在此处 http://blogote 所示。 com/wp-content/uploads/2010/11/android_101_tablet.jpg Android 按钮(主页、菜单、后退和搜索)是软件按钮,而不是像大多数其他 Android 设备上的硬件按钮。
我的问题是:是否可以在我的应用程序中隐藏该软件按钮?恕我直言,需要有一个适合平板设备的 SDK 之类的东西吗?!
从技术上讲,平板电脑似乎支持此功能,因为一些默认(预装)应用程序(例如视频播放器)在显示全屏视频时会执行此操作。
在我的应用程序中,我用来
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
将应用程序设置为全屏,但这当然不会隐藏软键。
I'm developing an Android app for an Archos 101 Android Tablet (Link: http://www.archos.com/products/ta/archos_101it/index.html). The Tablet runs Android 2.2 and as you can see here http://blogote.com/wp-content/uploads/2010/11/android_101_tablet.jpg the Android buttons (Home, Menu, Back and Search) are software buttons, and not hardware buttons like on most other Android devices.
My question is: Is it possible to hide this software buttons in my application? IMHO, there need to be something like an adapted SDK for the tablet devices?!
Technically the Tablet seems to support this functionality, because some default (pre-installed) apps like the video player do this when showing a full screen video.
In my app I use
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
to set the application to full screen, but of course this does not hide the softkeys.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我找到了解决方案。 后
添加到AndroidManifest.xml 。代码:
以全屏模式显示应用程序并隐藏 Android(软件)按钮。当然,建议实现允许用户退出应用程序的 UI 元素。
I found the solution. After adding
to the AndroidManifest.xml. The code:
shows the app in full-screen mode AND hides the Android (software) buttons. Of course, it is recommendable to implement UI elements that enables the users to quit the app.
有没有办法只隐藏一项活动的软按钮?
因为当我将权限行添加到清单中时,按钮似乎隐藏在我的所有活动中(这是有道理的,但不是我想要的)。这是一个视频播放器应用程序,所以这就是我问的原因。
Is there anyway to hide the soft buttons only for one activity?
Because when I added the permission line to the manifest it seems like the buttons were hidden in all my activities (which make sense but isn't what I wanted). It is a video player application, so that is why I am asking.
也许它可以帮助你:
http://developer.android.com/reference /android/view/inputmethod/InputMethodManager.html
hideSoftInputFromWindow(IBinder windowToken, int flags, ResultReceiver resultReceiver)
maybe it can help you:
http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html
hideSoftInputFromWindow(IBinder windowToken, int flags, ResultReceiver resultReceiver)