Possibility to completely remove option Menu.
Unchecking the Title Visible just hides Actionbar and Menu but doesn’t disable it. If there is any hardware Menu button on the phone it still shows option Menu after unchecking Title Visibly.
Solution one
Use any decompiling method that support smali
Notice
I’m not going to go into detail about how you go about it to decompile a Apk, since there are plenty of them on YouTube or Google. Maybe in the future I can make one or you can check this one out.Decompiled Apk
Go to your folder/path (Your Apk name)
..Your_Apk_name\smali\com\google\appinventor\components\runtime
find and open Form.smali file for editing, I recommend Notepad++ for this.
find .method public onCreateOptionsMenu
.method public onCreateOptionsMenu(Landroid/view/Menu;)Z
.locals 3
.param p1, "menu" # Landroid/view/Menu;
.prologue
.line 2170
invoke-super {p0, p1}, Lcom/google/appinventor/components/runtime/AppInventorCompatActivity;->onCreateOptionsMenu(Landroid/view/Menu;)Z
.line 2173
invoke-virtual {p0, p1}, Lcom/google/appinventor/components/runtime/Form;->addExitButtonToMenu(Landroid/view/Menu;)V
.line 2174
invoke-virtual {p0, p1}, Lcom/google/appinventor/components/runtime/Form;->addAboutInfoToMenu(Landroid/view/Menu;)V
.line 2175
iget-object v1, p0, Lcom/google/appinventor/components/runtime/Form;->onCreateOptionsMenuListeners:Ljava/util/Set;
invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_0
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/appinventor/components/runtime/OnCreateOptionsMenuListener;
.line 2176
.local v0, "onCreateOptionsMenuListener":Lcom/google/appinventor/components/runtime/OnCreateOptionsMenuListener;
invoke-interface {v0, p1}, Lcom/google/appinventor/components/runtime/OnCreateOptionsMenuListener;->onCreateOptionsMenu(Landroid/view/Menu;)V
goto :goto_0
.line 2178
.end local v0 # "onCreateOptionsMenuListener":Lcom/google/appinventor/components/runtime/OnCreateOptionsMenuListener;
:cond_0
const/4 v1, 0x1
return v1
.end method
edit const/v4 v1, 0x1 to const/v4 v1, 0x0
goto :goto_0
.line 2178
.end local v0 # "onCreateOptionsMenuListener":Lcom/google/appinventor/components/runtime/OnCreateOptionsMenuListener;
:cond_0
const/4 v1, 0x0
return v1
Done, build your Apk.
Solution two
After Toni provided his solution for Disabling the hardware menu button, doing it with Apk Modder will be far easier.
Notice
Requires a Donation to be usedDesigner Properties
Screen1
Sizing: Responsive
ShowStatusBar: Checked
TitleVisible: Checked
We will control StatusBar and Title with Apk Modder
Error!
Apk Modder v.1 OUTDATEDLaunch Apk Modder
Select Apk tab and choose the Select apk to decompile.
Decompile should take a couple of seconds to be completed.
Select Options tab and choose under Directories Decompile dir.
Go to “your_project_name.apk\smali\com\google\appinventor\components\runtime\form.smali” and select to edit form.smali.
Make sure to select from
.method public onCreateOptionsMenu(Landroid/view/Menu;)Z to .end method and delete that part, do not forget to save.
Make the necessary changes in the Manifest file.
Build new apk.
Finalize apk.
And that’s all….
8 comments
Skip to comment form
Where can i download apk modder?
Info and download: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!forum/gwayapps
Pledgie campaign: https://pledgie.com/campaigns/28753
can I leave ShowStatusBar and TitleVisible to unchecked?
Try and see what happens if you do so.
However, I recommend that you choose Theme.NoTitleBar.Fullscreen for that purpose.
how to download apk modder??> pledgie.com/campaigns/28753 not show any download link. please give a another download link of any other website like google drive, mediafire etc
Author
Unfortunately, I do not have a direct link for download because you have to go through the gwayapps forum.
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!forum/gwayapps
I’m making a multiple choice quiz application, but the home button, minimize, and the status bar above still work. how to keep students working on the home button, minimiz and status bar so that students can’t browse
Author
I’m somewhat unclear in your inquiry
/Boban