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

Search This thread

venkat kamesh

Inactive Recognized Contributor
Jan 11, 2012
2,236
10,881
Tirupati
xdaforums.com
Hello guys
After very long day

my second tut in this new year :p

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
 
Last edited:

venkat kamesh

Inactive Recognized Contributor
Jan 11, 2012
2,236
10,881
Tirupati
xdaforums.com
Settings

Welcome to easy part on adding the option to hide/show in settings

1. Decompile the Settings.apk
2. Download this View 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 (View 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 :p

Dont Forget to mention me if you used my work ;)
that feels me happy
 
Last edited:

raziel zarafan

Senior Member
Nov 23, 2014
192
51
33
México
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
 

-DM-

Senior Member
Dec 17, 2010
575
264
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 ;)
 

Laercio_lalau

Senior Member
Apr 1, 2015
245
150
São Paulo
adding a function in the button?
 

Attachments

  • 1453137095404.jpg
    1453137095404.jpg
    31.7 KB · Views: 2,064

Mirza_H

Senior Member
Jun 22, 2016
65
18
nice guide bro,I have a question,how so each go to the menu display, 3dot navbar keep active?
for every open menu display, 3dot navbar back off, so it must be activated if any open menu display
 

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    Hello guys
    After very long day

    my second tut in this new year :p

    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
    13
    Settings

    Welcome to easy part on adding the option to hide/show in settings

    1. Decompile the Settings.apk
    2. Download this View 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 (View 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 :p

    Dont Forget to mention me if you used my work ;)
    that feels me happy
    1
    nice guide bro,I have a question,how so each go to the menu display, 3dot navbar keep active?
    for every open menu display, 3dot navbar back off, so it must be activated if any open menu display
    Go read his guide here on settings switches :

    http://xdaforums.com/crossdevice-dev/sony-themes-apps/guide-dev-how-to-switch-checkbox-t3300468