Archos 101 互联网平板电脑:是否可以隐藏默认的 Android(软件)按钮

发布于 2024-10-06 20:46:00 字数 829 浏览 5 评论 0原文

我正在为 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

勿挽旧人 2024-10-13 20:46:00

我找到了解决方案。 后

<uses-permission android:name="archos.permission.FULLSCREEN.FULL" />

添加到AndroidManifest.xml 。代码:

this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);

以全屏模式显示应用程序并隐藏 Android(软件)按钮。当然,建议实现允许用户退出应用程序的 UI 元素。

I found the solution. After adding

<uses-permission android:name="archos.permission.FULLSCREEN.FULL" />

to the AndroidManifest.xml. The code:

this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);

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.

遇到 2024-10-13 20:46:00

有没有办法只隐藏一项活动的软按钮?

因为当我将权限行添加到清单中时,按钮似乎隐藏在我的所有活动中(这是有道理的,但不是我想要的)。这是一个视频播放器应用程序,所以这就是我问的原因。

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.

夏九 2024-10-13 20:46:00

也许它可以帮助你:

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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文