FORUMS
Remove All Ads from XDA

[Guide][tut] [Updated 21/JAN/15] Show/Hide 3 Dot Menu (on nav bar)

2,182 posts
Thanks Meter: 10,464
 
Post Reply Email Thread
Hello guys
After very long day

my second tut in this new year

So here i gonna provide a tut on Hide/Show 3 Dot Menu ( which is hidden in navigation Bar )

All you need is
Deodexed Settings.apk and SystemUI.apk

1. Decompile SystemUI.apk
2. Navigate to SystemUI.apk/smali/com/android/systemui/statusbar/phone
3. Open NavigationBarView.smali and look for this method
Code:
.method public setMenuVisibility(ZZ)V
and replace the complete method with this below
Code:
.method public setMenuVisibility(ZZ)V
    .locals 3

    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "dot_menu_show"

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    if-eqz v0, :cond_0

    const/4 p1, 0x1

    :cond_0
    const/4 v1, 0x0

    if-nez p2, :cond_1

    iget-boolean v2, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mShowMenu:Z

    if-ne v2, p1, :cond_1

    :goto_0
    return-void

    :cond_1
    iput-boolean p1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mShowMenu:Z

    iget-boolean v2, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mShowMenu:Z

    if-eqz v2, :cond_2

    iget v2, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mNavigationIconHints:I

    and-int/lit8 v2, v2, 0x2

    if-nez v2, :cond_2

    const/4 v0, 0x1

    :goto_1
    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getMenuButton()Landroid/view/View;

    move-result-object v2

    if-eqz v0, :cond_3

    :goto_2
    invoke-virtual {v2, v1}, Landroid/view/View;->setVisibility(I)V

    goto :goto_0

    :cond_2
    move v0, v1

    goto :goto_1

    :cond_3
    const/4 v1, 0x4

    goto :goto_2
.end method
4. Now save and close
5. Compile it and sign it and replace

Time to Work on with settings
Look for post #2
The Following 20 Users Say Thank You to venkat kamesh For This Useful Post: [ View ] Gift venkat kamesh Ad-Free
 
 
17th January 2016, 07:23 PM |#2  
venkat kamesh's Avatar
OP Recognized Contributor
Flag Tirupati
Thanks Meter: 10,464
 
Donate to Me
More
Settings
Welcome to easy part on adding the option to hide/show in settings

1. Decompile the Settings.apk
2. Download this Attachment 3606027 and merge to your settings
3. Add the below code to your settings ( i had added to my own settings.xml )
you can add in settings.apk/res/xml/Dispaly_settings.xml

Code:
		<com.android.settings.cyanogenmod.SystemSettingSwitchPreference android:title="3Dot Menu" android:key="dot_menu_show" android:defaultValue="0" android:summaryOn="Shown" android:summaryOff="Hidden" />
and then compile/sign and replace your settings


OR
Try download this ROM Control application (Attachment 3616872 ) where you can Easily control
All you is just install and have fun
Thanks to @daxgirl for the app source


now have fun guys

Dont Forget to mention me if you used my work
that feels me happy
The Following 12 Users Say Thank You to venkat kamesh For This Useful Post: [ View ] Gift venkat kamesh Ad-Free
17th January 2016, 10:57 PM |#3  
raziel zarafan's Avatar
Senior Member
Flag México
Thanks Meter: 27
 
More
Works fine bro thanks so much the only bug for me it's that the switch still be unable after that I enable and return to the screen settings anyway the dots works fine
18th January 2016, 02:08 AM |#4  
Rajeev's Avatar
Senior Member
Flag Chennai , I N D I A
Thanks Meter: 25,083
 
Donate to Me
More
Great tutorial bro.. Keep up the good work..
18th January 2016, 08:02 AM |#5  
Senior Member
Thanks Meter: 257
 
More
Quote:
Originally Posted by venkat kamesh

...

You can also do this on a single app level if for example an app shows the legacy 3 dots menu but with no actual use for it when running on Android 3.0+
All you have to do is in the app manifest under sdkInfo set targetSdkVersion to 14 and minSdkVersion to a minimum of 11 and the button will be gone
18th January 2016, 05:11 PM |#6  
Laercio_lalau's Avatar
Senior Member
Flag São Paulo
Thanks Meter: 142
 
More
adding a function in the button?
Attached Thumbnails
Click image for larger version

Name:	1453137095404.jpg
Views:	1896
Size:	31.7 KB
ID:	3614436  
18th January 2016, 05:15 PM |#7  
Laercio_lalau's Avatar
Senior Member
Flag São Paulo
Thanks Meter: 142
 
More
Uoouuu I just found out. thank you
19th January 2016, 02:33 AM |#8  
Member
Thanks Meter: 4
 
More
Thank bro
2nd February 2016, 12:22 PM |#9  
Junior Member
Thanks Meter: 0
 
More
Thanks!!!!Could you teach me how to make the menu button always show by default?
25th June 2016, 06:18 PM |#10  
Bloodlvst's Avatar
Senior Member
Flag Riverview, NB
Thanks Meter: 367
 
Donate to Me
More
I can confirm this tut works on Marshmallow
26th June 2016, 05:53 PM |#11  
venkat kamesh's Avatar
OP Recognized Contributor
Flag Tirupati
Thanks Meter: 10,464
 
Donate to Me
More
Quote:
Originally Posted by Bloodlvst

I can confirm this tut works on Marshmallow as long as you do a SystemUI restart

bro it works without restart ui

just click back (after enable) and tada you get dot menu

regards
VK
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes