0

screenshot

Got this app running in kiosk mode and would like to run it on full screen. Already got rid of the application's grey title bar, but still got the home, volume, back and other buttons on the top bar as you can see in the picture.

The device is running android 2.2 firmware.

Any help is greatly appreciated!

jjgl
  • 387
  • 1
  • 5
  • 10

5 Answers5

13

So there is more approaches:

First, you should specify this feature in your Manifest.xml

android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"

Or in your onCreate method work both these approaches:

this.requestWindowFeature(Window.FEATURE_NO_TITLE);

or

this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
Simon Dorociak
  • 33,374
  • 10
  • 68
  • 106
  • Have tried these already but only got rid of the little grey bar with the apps name on it. Any other ideas? – jjgl Jun 15 '12 at 18:03
4

The tablet you are running on is running a hacked version of Android, one that does not comply with the Compatibility Definition Document. As a result, you probably cannot get rid of that bar, unless you replace the firmware with something else.

The recommendations that the other provided is the right answer for compatible Android devices.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • ok, thanks! but how do you know that its running a hacked version of android? – jjgl Jun 18 '12 at 16:56
  • If it is running a hacked version of android, its been hacked by the manufacturers then. I installed the firmware downloaded from the manufacturer's website. The tablet is a bq verne plus btw. – jjgl Jun 18 '12 at 17:09
  • 2
    @jjgl: "its been hacked by the manufacturers then" -- most likely, that is true. "how do you know that its running a hacked version of android?" -- Android 2.2 does not support that top "system bar"-style UI for HOME, MENU, and BACK. – CommonsWare Jun 18 '12 at 19:55
3

Make Your activity to look something like this in manifest

            <activity
            android:name=".HelloActivity"
            android:label="@string/laptop"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
Vipul
  • 27,808
  • 7
  • 60
  • 75
1

In android manifest use this line

<activity android:name=".yourActivityName"
          android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">

and in your class use this line in oncreate method

requestWindowFeature(Window.FEATURE_NO_TITLE);  

this code works fine for android 2.2 i have tested and its working.

code singh
  • 63
  • 1
  • 2
  • 11
0
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

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

    setContentView(R.layout.activity);
Venkat Vinay
  • 89
  • 2
  • 5