Android OS Forum banner
21 - 35 of 35 Posts

·
Android Beginner
Joined
·
19 Posts
9. Find these methods/lines: .method public setMenuVisibility(Z)V and .method public setMenuVisibility(ZZ)V

You want to delete most of the content of these methods, leaving just the .locals, .paramaters, and return lines. Here's what it should looks like:

Code:
<br />
.method public setMenuVisibility(Z)V<br />
	.locals 1<br />
	.parameter "show"<br />
<br />
	return-void<br />
.end method<br />
<br />
.method public setMenuVisibility(ZZ)V<br />
	.locals 2<br />
	.parameter "show"<br />
	.parameter "force"<br />
<br />
	return-void<br />
.end method<br />
[background=rgb(245, 245, 245)]Doing this keeps the menu key always visible.[/background]
If I just want the standard 3dot menu to always show would I only need this step?
 

·
Registered
Joined
·
2 Posts
Awesome guide! Thanks! Quick question about adding a long-press. I want to long press menu and have to go to recents. So in the menu button code, I add the "systemui:keyRepeat="true"" like you said, but then what? Do I add the code for the second button after it? Thanks a ton for your work on this! :D
 

·
Average Android
Joined
·
486 Posts
Discussion Starter · #24 ·
Awesome guide! Thanks! Quick question about adding a long-press. I want to long press menu and have to go to recents. So in the menu button code, I add the "systemui:keyRepeat="true"" like you said, but then what? Do I add the code for the second button after it? Thanks a ton for your work on this! :D
You don't need to do anything else. The default long press behavior for home is recents and for search is voice search.
 

·
Registered
Joined
·
2 Posts
You don't need to do anything else. The default long press behavior for home is recents and for search is voice search.
Gotcha. Is it possible to change the defaults? I want to add long-press to the menu button. And on 4.1.1, when I long press on Home, I get Google Now. Are you saying if I change the "systemui:keyRepeat="false"" that's currently in the Home button to "true" then it will change from Google Now to Recents (the default you just said)? Thanks again!
 

·
Average Android
Joined
·
486 Posts
Gotcha. Is it possible to change the defaults? I want to add long-press to the menu button. And on 4.1.1, when I long press on Home, I get Google Now. Are you saying if I change the "systemui:keyRepeat="false"" that's currently in the Home button to "true" then it will change from Google Now to Recents (the default you just said)? Thanks again!
Yes I believe it will be bring up recents instead of the google now ring, but it's been a while so I don't quite remember, it might actually just pop up recents on top of the ring. As for changing the defaults, that would require further custom code changes that are beyond my expertise and the scope of this mod.
 

·
Member
Joined
·
46 Posts
I followed the guide in an attempt to add a search nav button to a rasbeanjelly for the N4. I made all the changes and recompiled SystemUI.apk successfully (didn't see any errors at least). I copied res folder, classes.dex, resources.arsc into the original SystemUI.apk and flashed the rom again. It flashed fine but SystemUI forces closes after booting.

Is this most likely a post compiling issue with signatures ... or some other error I made along the way before compiling? When I saw no compiling errors I thought I was in the clear.

Thanks for the guide.

Edit: Could the navigationbar.xml file you linked be different/incompatible with what I need? I suppose I should compare them.
 

·
Registered
Joined
·
12 Posts
I followed the guide in an attempt to add a search nav button to a rasbeanjelly for the N4. I made all the changes and recompiled SystemUI.apk successfully (didn't see any errors at least). I copied res folder, classes.dex, resources.arsc into the original SystemUI.apk and flashed the rom again. It flashed fine but SystemUI forces closes after booting.

Is this most likely a post compiling issue with signatures ... or some other error I made along the way before compiling? When I saw no compiling errors I thought I was in the clear.

Thanks for the guide.

Edit: Could the navigationbar.xml file you linked be different/incompatible with what I need? I suppose I should compare them.
You dont need to copy res classes and resource file when compiling a systemui. If it compiled without errors that should be fine.

And btw this is my navigation bar xml for rasbean jelly you should be fine to use it on n4. Default layout is back-menu-home-recent. Just add the search key line or remove the menu and insert search key in to it. Donload>http://db.tt/oYAb00kX

Sent from my Galaxy Nexus
 

·
Member
Joined
·
46 Posts
You dont need to copy res classes and resource file when compiling a systemui. If it compiled without errors that should be fine.

And btw this is my navigation bar xml for rasbean jelly you should be fine to use it on n4. Default layout is back-menu-home-recent. Just add the search key line or remove the menu and insert search key in to it. Donload>http://db.tt/oYAb00kX

Sent from my Galaxy Nexus
I thought you needed to use the original androidmanifest and meta-inf to not screw up signatures or other checks?

EDIT: I used the systemui.apk in the dist folder and it doesn't force close anymore. The status bar and nav bar isn't showing but I'm getting closer.
 

·
Registered
Joined
·
12 Posts
I thought you needed to use the original androidmanifest and meta-inf to not screw up signatures or other checks?

EDIT: I used the systemui.apk in the dist folder and it doesn't force close anymore. The status bar and nav bar isn't showing but I'm getting closer.
Yes if your modifying the framework that would be the case.

Sent from my Galaxy Nexus
 

·
Registered
Joined
·
1 Posts
Hey Detonation A very nice job, have u seen the navigation keys action in Huawei Ascend D2,
it has a fourth button on left hand side on nav bar,it is for hiding the nav bar.
You can recall the nav bar by just swapping the finger to upside at the bottom.
The nav keys will be visible again.The purpose of showing this to u is I hope from u that,
U can make a mod like that for our xperia devices,I have Xperia V running on 1.140fw..........
Waiting for a miracle from U,Thanx in advance
 

·
Registered
Joined
·
1 Posts
Is there any chance of getting this updated to 4.2.x? I was trying to do this for my nexus 7, but it is different enough I cannot seem to get it working. I assume it is the difference between 4.1 and 4.2.
Using a gnex deodexed stock 4.2.2 firmware..

I got it working just fine albeit minus the search button, since I don't have a use for it. It takes some finagling but it works, the process isn't identical. I got it to work however! It started out really slow, first I'd reorder the navbar, then I added the menu key and long press for the home button to get recent apps to show up. Right now I'm trying to get it worked out so that the menu button isn't tiny and they're all centered.

Slowly but steadily I'll figure it out! Trial and error my friend! I just gotta figure out the spacing for the navbar! I will post my navigation_bar.xml later I'm off to bed!
 

Attachments

21 - 35 of 35 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top