Popup Menu – Android Studio Tutorial

Video is ready, Click Here to View ×


In this video we will create a simple PopupMenu and handle it’s click events using the setOnMenuItemClickListener method.

____________________
Subscribe to my channel:

Want more Android tutorials? Check my playlist section:

Follow me on social…

COMMENTS (17)

  • comment-avatar

    what if I want to have 3 buttons but with different names of the item, will it work with just one showpopup class

  • comment-avatar

    thanku so much dear ,,,,,,,,love these tutorial
    Coding in Flow is the one of the best channel on you tube ….
    best android learning channel
    thank dear

  • comment-avatar

    I would love that you included the files created&changed in your demo under the video. Thanks a lot!

  • comment-avatar
  • comment-avatar
  • comment-avatar
  • comment-avatar

    انت مبدع ♥

  • comment-avatar
  • comment-avatar
  • comment-avatar

    Nice and simple tutorial. Thanks

  • comment-avatar

    i am working with fragments myself and sadly these tutorials are not much use for me 🙁

  • comment-avatar

    Edit : Thanks for your helps 😀
    ***
    I used intent structure to update to a textview in activity_main.xml with popup menu options ..
    it works but it's ugly. Because with intent structure, just updating a view in whole page we are updating whole page –> startActivity(intent) –> its sound comes weird to me .
    there must be a way to update a view via custom or standard popup menu without refreshed to whole page over startActivity().

    instead of using toast message structure in this video, can't you make it with updating a textview without refreshing the page over intent structure ..?

  • comment-avatar

    hi, i have a question about menu structure.
    I want to call a method which use View in onMenuItemClick / switch / case . But it's not possible, View view could not be called in onMenuItemClick, it doesn't use it ? how can we do that ?

  • comment-avatar

    Thanks a lot!! 😀
    I tried to add EditText instead of item but system doesn't accept this usage.
    How can we use a pop-up window to enter a text input ?

  • comment-avatar

    thanks for this tutorial

  • comment-avatar

    Thx again for this tuto ! I have a question, how can i change the background color of Item1, then another for item 2, 3 etc … ? Not changing the theme, but per item from the menu, can select a color.

  • comment-avatar

    Love these tutorials 🙂