2

I have one Activity which has content view having its root view as FrameLayout, i want to hide bottom bar's soft keys for which i have added following code inside onCreate of myActivity but it doesn't effect anything.

FrameLayout frameLayout = (FrameLayout)this.findViewById(R.id.myframe);
frameLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);

Is there any permission or extra code which i need to add?

Thanks in advance :)

Note : I am trying this on Android HoneyComb(API 13)

RPB
  • 16,006
  • 16
  • 55
  • 79

4 Answers4

4

I guess all you need is to set targetSdkVersion in AndroidManifest to a proper one, say 11 or 13 for 3.0 or 3.2 repsectively.

Glenn Yu
  • 613
  • 1
  • 7
  • 11
2

SYSTEM_UI_FLAG_LOW_PROFILE was added in Api Level 14 (Ice Cream Sandwich). It won't work before that, such as on Honeycomb.

cottonBallPaws
  • 21,220
  • 37
  • 123
  • 171
  • But on Honeycomb also you tube full screen does the same thing as SYSTEM_UI_FLAG_LOW_PROFILE do, what is that then? is there any alternative for this in Honeycomb? – RPB Nov 16 '12 at 03:50
1

Try this:

getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
animuson
  • 53,861
  • 28
  • 137
  • 147
PC.
  • 6,870
  • 5
  • 36
  • 71
1

SYSTEM_UI_FLAG_LOW_PROFILE Added in API level 14 and the one which is before it was STATUS_BAR_HIDDEN and this is since api 11 but it's now deprecated

source http://developer.android.com/reference/android/view/View.html#STATUS_BAR_HIDDEN

Ahmed Mostafa
  • 379
  • 3
  • 4