开发者

Archos 101 internet tablet: Is it possible to hide default Android (software) buttons

开发者 https://www.devze.com 2023-01-29 18:59 出处:网络
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.co

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 m开发者_开发百科y 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.


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.


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.


maybe it can help you:

http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html

hideSoftInputFromWindow(IBinder windowToken, int flags, ResultReceiver resultReceiver)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号