1

there are launcher which offers the possibility to hide or protect the status bar. i tried to get the position of the menu with TouchEvent and menu position when there is a touch I put a popup to say you are not allowed but the touchEvent gives actions on screen so how can I hide the status bar I tried

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.main_grid);
        mGrid = (GridView) findViewById(R.id.gridview);
        mGrid.setColumnWidth(95);
        mGrid.setVisibility(0x00000000);
        mGrid.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
diez
  • 125
  • 1
  • 5
  • 12
  • http://stackoverflow.com/questions/13800009/hide-android-status-bar-for-my-application-on-android-4-0-4 – jasonflaherty Mar 28 '13 at 15:40
  • what device / emulator configuration are you trying this? btw, take a look [here](http://stackoverflow.com/questions/14178237/setsystemuivisibilitysystem-ui-flag-layout-hide-navigation-does-not-work), could be useful – lelloman Mar 28 '13 at 16:06
  • @diez I know that when things don't work it can be quite frustrating (sadly I know it very well), but if you want others to help you, I suggest you to collaborate, otherwise people will very likely ignore you and your problem. – lelloman Mar 28 '13 at 16:34
  • i am trying to use setSystemUiVisibility(SYSTEM_UI_FLAG_FULLSCREEN | SYSTEM_UI_FLAG_HIDE_NAVIGATION) as mentioned in the link – diez Mar 28 '13 at 16:38

2 Answers2

2

you can do it programmatically by calling

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);

I think you must do it before than

setContentView(whatever);

or by editing app style, adding

<item name="android:windowFullscreen">true</item>

inside <style>

lelloman
  • 13,883
  • 5
  • 63
  • 85
  • 1
    @diez well, it would be nice if you could say what you've already tried when asking a question, and eventually post some code ^^ – lelloman Mar 28 '13 at 15:43
  • getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.main_grid); mGrid = (GridView) findViewById(R.id.gridview); mGrid.setColumnWidth(95); mGrid.setVisibility(0x00000000); mGrid.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION); – diez Mar 28 '13 at 15:56
  • 1
    @diez could you please edit your question? reading code in the comment is a punch in the stomach – lelloman Mar 28 '13 at 15:59
0

Did you try this in your Manifest?

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
jasonflaherty
  • 1,924
  • 7
  • 40
  • 82
  • this one is for the title bar and not the status bar – diez Mar 28 '13 at 15:43
  • no, i tried some launcher when we click, on it we have a message action is denied. i would like to do something like that but i don't know how. – diez Mar 28 '13 at 15:50