-1

I m working in an android project. This project contains many activities. I m trying to remove the system bar (footer bar) from one fo the existing activities. But it is not possible according to this link.

My idea now is to decrease the height of the system bar as much as possible.

I make some research and I found that I could change the height of the system bar via the xml file res/values/dimens.xml

I could not find this file on my source code. I do not know how to create a such file (syntax) and I do not know how to mention the new dimension of the system bar. And I m looking to change the height of the system bar for only a giving activity and not for all activities of my android application

Community
  • 1
  • 1
MOHAMED
  • 41,599
  • 58
  • 163
  • 268

2 Answers2

1

If i understood well you want to hide the navigation bar. You can do this but when the user touch on the screen bar will appear again. Otherwise, if your app crashes for any reason, user couldn't interact with the device. You can find more details about how you can do this in Android Api http://developer.android.com/training/system-ui/navigation.html

Also you can find a fully worked example here

http://android-er.blogspot.gr/2012/05/hide-and-auto-show-navigation-bar-for.html

Eleftherios
  • 186
  • 1
  • 13
0

Be aware that there are devices without hardware buttons. If you hide the system bar the user can not navigate out of your activity.

Nevertheless you can try to put this inside your Activity's onCreate():

getWindow().getDecorView().setSystemUiVisibility( View.SYSTEM_UI_FLAG_LOW_PROFILE );

or this on older devices:

getWindow().getDecorView().setSystemUiVisibility( View.STATUS_BAR_HIDDEN )

EDIT:

If you in real are talking about the action bar, not the system bar: See this on SO: How to change action bar size

Community
  • 1
  • 1
StefanTo
  • 971
  • 1
  • 10
  • 28
  • I m not looking for hiding the system bar. it's not possible as I said in my question. I m looking to change the height of the system bar – MOHAMED Dec 11 '14 at 08:58
  • It's not possible to change the height of the system bar (back button, home button, recents button). You can only change the height of the action bar. (See here: [link](http://stackoverflow.com/questions/17439683/how-to-change-action-bar-size)) – StefanTo Dec 11 '14 at 09:26