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

Search This thread

jastonas

Senior Member
Jul 1, 2010
1,172
191
Patra
Redmi Note 10 Pro
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
the line
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:

kahraman11

Member
Aug 26, 2012
24
2
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
 

jastonas

Senior Member
Jul 1, 2010
1,172
191
Patra
Redmi Note 10 Pro
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.
 

jastonas

Senior Member
Jul 1, 2010
1,172
191
Patra
Redmi Note 10 Pro
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
 

ryan1977

Senior Member
Oct 12, 2012
421
66
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
60
7


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:

norpan111

Senior Member
Mar 28, 2010
3,312
529
Halmstad
Go into system/usr/keylayout/gpio-keys.kl and you can change "home" to camera if you want home button to snap pics

Skickat från min GT-I9300 via Tapatalk 2
 

fridlack

Senior Member
May 28, 2009
742
106
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,644
4,750
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://xdaforums.com/showthread.php?t=1918166
 

respider

Senior Member
Sep 18, 2008
703
237
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
742
106
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://xdaforums.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:

dgcruzing

Senior Member
Nov 21, 2010
1,173
322
Mermaid Beach QLD
Be back for this.. I find the middle button a bit sticky and as I multitask between chat and translate programs its kinda laggy compared to the old evo

Sent from my GT-I9300 using Tapatalk 2
 

Top Liked Posts

  • There are no posts matching your filters.
  • 31
    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
    the line
    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
    4
    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.
    2
    i9505 enable stock navigation bar menu

    just in case anyone wonders:

    in order for the qemu.hw.mainkeys=0 - mod to work, the framework actually has to contain the necessary image files etc.
    the stock rom will not contain these - most likely. like it was the case with my stock 4.2.2 on the SGS4.

    it is possible to add these files to the existing framework by decompiling the SystemUI.apk. there is a thread explaining what exactly has to be done. (it is very, very complicated and prone to errors)

    i strongly advice using roms where the navbar is just disabled, not removed from the rom. (like the original CyanogenMod- roms)

    i am currently on a CM nightly (10.1) for the intern. Qualcom SGS4 AKA jfltexx AKA i9505.

    here the build.prop mod works perfectly.

    one little advice: it's not always the system/usr/keylayout/Generic.kl which has to be adjusted in order to disable the hardware keys (softkeys).

    in my case it's the system/usr/keylayout/sec_touchkey.kl containing 4 entries

    excluding the entry for menu and back (with a # at the beginning of the line) the according soft buttons will be disabled (upon restart).

    excluding the home button doesn't do anything.
    this is most likely due to the fact that this key is "always_on" (kernel-speciffic) to be able to wake the phone on press.
    i don't mind the key to still be active since it is not accidentially pressed like the softkeys.

    best,
    z
    2
    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://xdaforums.com/showthread.php?t=1918166