How To Make a Custom Pop Up Menu In Tool Bar | In Sketchware || Add SourceDirectly .

Hey guys,
welcome back to the blog.
So guys today in this blog I am going to show you how to make a Custom Pop Up Menu in Tool Bar | In Sketchware || Add SourceDirectly

So guys for making this Pop Up Menu we are going to use "Add SourceDirectly" block & the code is also given below. It's very easy simple just follow my step which are given in this blog.

How To Make a Custom Pop Up Menu In Tool Bar | In Sketchware || Add SourceDirectly ?

You can also prefer to our YouTube video:


1. Open the Sketchware application.
2. Click on the "+" fab to add your project & click on " create app".
3. Then your project's UI designing interface will open.


4. Then move to "Event".
5. On Activity click to "on create " option.
6. Then from "operator" drag the on "add source directly" block.


7. paste the code in the "Add source directly".

Code: 

}

@Override
public boolean onCreateOptionsMenu(Menu menu){

menu.add("About").setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);

menu.add("Privacy Policy").setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);

menu.add("Settings").setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);

menu.add("Exit").setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);

return true;
}

@Override 
public boolean onOptionsItemSelected(final MenuItem item) {
switch (item.getTitle().toString()) {

case "About":
_aboutClicked();
return true;

case "Privacy Policy":
_privacyClicked();
return true;

case "Settings":
_settimgsClicked();
return true;

case "Exit":
_exitClicked();
return true;

default:
return super.onOptionsItemSelected(item);
}

8. Then copy the following from the code. ( Shown in the image 👇)


9. Now move to "More Block"
10.Then add the more block by pasting the following which you have copied from the code one by one. (As shown in the image 👇)

And after creating the more block add the work which you want to do with it.

11. Click to run & install your application and it will look like this :

Thanks for visiting our blog.

How To Make a Custom Pop Up Menu In Tool Bar | In Sketchware || Add SourceDirectly . How To Make a Custom Pop Up Menu In Tool Bar | In Sketchware || Add SourceDirectly . Reviewed by Shahbaz Hashmi Ansari on July 03, 2020 Rating: 5

No comments:

Powered by Blogger.