[Guide][JB][SammyRom]Enable On Screen Navigation bar - Soft buttons

jastonas

Senior Member
Jul 1, 2010
1,171
191
93
Patra
I know there are many posts about this but it took me a while to understand how it works and there is no single thread which has the information gathered in the first post, so I decided to make this. Sorry if it uneeded.

Anyone who want's to use on screen NavBar buttons, he's lucky! (at least compared to ICS).


Now, by adding in
/system/build.prop
the line
qemu.hw.mainkeys=0
you get the navigation bar (after reboot) and at the same time Android system recognizes this and adds the three dot menu icon whenever needed*!

If you want to disable the hardware keys, edit the file
/system/usr/layout/Generic.kl
These are the three hardware buttons
key 172HOME
key 158BACK
key 139MENU
Add a # before any you don't wan't to use any more. I did for 158 and 139 and left my Home button working.

There is a mod** (flash it in recovery) which makes the bar almost half the size. It's better looking and less space is wasted but it does get some time to get used to it and you might need a couple of tries sometimes when trying to hit those buttons.

*This wasn't the case for ICS.

**mod by houssam10001
 
Last edited:

jastonas

Senior Member
Jul 1, 2010
1,171
191
93
Patra
Why would somebody use this on the s3? You got buttons under your screen already

Sent from my GT-I9300 using xda app-developers app
For people to want it, there must be a reason.

I've got 2!

a) I accidentally press the back button when watching videos and is ANNOYING!

b) I am a "fast" user and multitask a lot. Replacing the Menu button with Recents button makes my life easier and faster. And less annoying again, because pressing and holding the crappy home button is not so convenient.
 

delsus

Senior Member
Oct 23, 2011
4,668
877
0
Adding the line to build.prop hasn't added the navbar after a reboot for me, does it need to go in a specific place, or does something else need changing as well?
 

jastonas

Senior Member
Jul 1, 2010
1,171
191
93
Patra
Adding the line to build.prop hasn't added the navbar after a reboot for me, does it need to go in a specific place, or does something else need changing as well?
Yesss! I'm really sorry, I messed up. I fixed OP with correct line to add.

qemu.hw.mainkeys=0

Sent from my GT-I9300 using Tapatalk 2
 
  • Like
Reactions: delsus

delsus

Senior Member
Oct 23, 2011
4,668
877
0
Yesss! I'm really sorry, I messed up. I fixed OP with correct line to add.

qemu.hw.mainkeys=0

Sent from my GT-I9300 using Tapatalk 2
It's working now, just one problem the home screen indicator is now behind the bottom shortcuts, is there any way to remove them or move them?

Sent from my GT-I9300 using xda premium
 
  • Like
Reactions: X~Factor

jastonas

Senior Member
Jul 1, 2010
1,171
191
93
Patra
It's working now, just one problem the home screen indicator is now behind the bottom shortcuts, is there any way to remove them or move them?

Sent from my GT-I9300 using xda premium
Unfortunately no. I use Nova launcher. Any other will do. Almost all Samsung touchwiz apps have a problem with this mood but I can live with that.

Sent from my Nexus 7 using Tapatalk 2
 

delsus

Senior Member
Oct 23, 2011
4,668
877
0
Unfortunately no. I use Nova launcher. Any other will do. Almost all Samsung touchwiz apps have a problem with this mood but I can live with that.

Sent from my Nexus 7 using Tapatalk 2
Aww thanks again though :)

Sent from my GT-I9300 using xda premium
 

ryan1977

Senior Member
Oct 12, 2012
421
66
0
Awesome, these look great on beans jb build 2. Useing nova launcher they fit on screen well. My back button hard key is shot so this makes life a lot easier!

Sent from my SCH-I535 using Tapatalk 2
 

Deca4

Senior Member
Feb 13, 2010
58
6
0


you get the navigation bar (after reboot) and at the same time Android system recognizes this and adds the three dot menu icon whenever needed*!

If you want to disable the hardware keys, edit the file

These are the three hardware buttons

Add a # before any you don't wan't to use any more. I did for 158 and 139 and left my Home button working.

There is a mod** (flash it in recovery) which makes the bar almost half the size. It's better looking and less space is wasted but it does get some time to get used to it and you might need a couple of tries sometimes when trying to hit those buttons.

*This wasn't the case for ICS.

**mod by houssam10001



Great post.

I tried switching the Menu and the back button but it did not change the layout. I want to have the same layout as the Nexus devices with the back button first, home, menu(task). Is generic.kl is the right area to make the change? Thanks in advance.
 
M

mentose457

Guest
Great post.

I tried switching the Menu and the back button but it did not change the layout. I want to have the same layout as the Nexus devices with the back button first, home, menu(task). Is generic.kl is the right area to make the change? Thanks in advance.
In order to change the order you have to decompile SystemUI.apk, edit the tw_navi_bar.XML file, recompile, then merge the edits into the original apk, then replace the app.

tw_navi_bar.xml can be found in /res/layout/

you simply need to switch the lines of code for the back and recents buttons to look like what is below. Note that the code below is from beans rom build 8 for the verizon s3. The code should be very similar for your rom though. Also note that you will need to do it for landscape too.

Code:
<LinearLayout android:orientation="horizontal" android:id="@id/nav_buttons" android:background="@drawable/tw_navigationbar_bg" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:animateLayoutChanges="false">
	    <com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_navigationbar_back" android:layout_weight="1.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" systemui:glowBackground="@drawable/tw_sysbar_highlight" />
	    <com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_navigationbar_home" android:layout_weight="1.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="true" systemui:glowBackground="@drawable/tw_sysbar_highlight" />
            <com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_navigationbar_recent" android:layout_weight="1.0" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/tw_sysbar_highlight" />
            <com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_navigationbar_menu" android:layout_weight="1.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" systemui:glowBackground="@drawable/tw_sysbar_highlight" />
        </LinearLayout>
 
Last edited:

fridlack

Senior Member
May 28, 2009
736
105
0
Gava, Barcelona
There is a way to change the menu button function to pops the multitasks window and place the 3 dots in all aplications like when you have the navigation bar active without the navigation bar?

Hope you undestand it :p

Best regards
 

Theshawty

Senior Member
Feb 13, 2011
16,646
4,751
0
There is a way to change the menu button function to pops the multitasks window and place the 3 dots in all aplications like when you have the navigation bar active without the navigation bar?

Hope you undestand it :p

Best regards
Is this a question or a statement? :confused: It's hard to understand when it has the structure of a statement but ends with a question mark.

---------- Post added at 04:56 PM ---------- Previous post was at 04:47 PM ----------

What of these zips? They're supposed to automate the change (I've used them before when I used CM10.1). I dunno if they work with touchwiz, tho.

http://forum.xda-developers.com/showthread.php?t=1918166
 

respider

Senior Member
Sep 18, 2008
700
235
0
Sao Paulo
b) I am a "fast" user and multitask a lot. Replacing the Menu button with Recents button makes my life easier and faster. And less annoying again, because pressing and holding the crappy home button is not so convenient.
how do you replace menu hard button with recent list?
I mean, what's the the "key word" to use?
 
Last edited:

fridlack

Senior Member
May 28, 2009
736
105
0
Gava, Barcelona
Is this a question or a statement? :confused: It's hard to understand when it has the structure of a statement but ends with a question mark.

---------- Post added at 04:56 PM ---------- Previous post was at 04:47 PM ----------

What of these zips? They're supposed to automate the change (I've used them before when I used CM10.1). I dunno if they work with touchwiz, tho.

http://forum.xda-developers.com/showthread.php?t=1918166
You're right, my English is so bad, I tried to make a question :p

I'll check the link you posted, thanks for it

Best regards
 
Last edited:

janver22

Senior Member
Aug 10, 2008
55
4
28
Carmona, Cavite
Enabling the navbar on sammy rom (omega in my case) causes my phone to freeze while playing The Dark Knight Rises. Disabled it and does not freeze anymore.

Sent from my GT-I9300 using xda app-developers app
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone