In this video we will create an options menu in Android Studio, which contains icons, drop down menus and sub items. The menu will be displayed in the app bar. For this we will override onCreateOptionsMenu and pass our own menu.xml file. Also we will handle click events on the single items in the onOptionsItemSelected method.
Example code for this video:
____________________
❗ Subscribe to the channel:
⏯ Watch more tutorials:
⭐ Become a channel member for exclusive tutorials and other perks:
㊙ Help translating the videos:
💚 Support the content:
💬 Join the Discord chat:
🎧 Audiobooks and podcasts for programmers:
👶 How to get started with Android development:
📣 Follow Coding in Flow on social media:
Facebook:
Instagram:
Twitter:
Blog:
Nguồn:https://u-os.org/
Xem Thêm Bài Viết Khác:https://u-os.org/cong-nghe
* * *
I added a link to the code for this video into the description box!
* * *
how to remove title of submenu item on right side option menu?
as always, another very helpful video
Hello. Is it possible to ask on how you can combine the tic tac toe game with the options menu? Thank you.
Do you have a tutorial where you use such menu to switch between fragments?
eine schöne Erklärung , danke
PERFECT
at 6:00 why does adding break; after each case and at the end of the function returning true does not work?
You. are. awesome.
Every video is perfect! Keep up the good work
how to hide the title after i open subitem of the other menu in that item??
even in 2019 youre the best, i code on flutter, just wanted to see android and its like i'm a genius. Thanks
thank you. always awesome tutorials from you!
thank you!, u are my savior
how to hide navbar to example_menu.xml??
How to change color of three dots to black??
Thank you very much , very nice video :).
Thank you bro
How do I prevent it from displaying the app's name? Also, why does the toolbar move when it transitions to a new activity? Why isn't it's animation static?
Hey! I don't know why I can't see my menu in the activity! What can I do? Do I have to change anything in the xml? I'm dead
Nice one, thank you : )
Thank you! You explained very simply and affordably!
Much appreciated man. This helped me finish my final project in Mobile App class! Thank you for spreading your knowledge of Android Studio 🙂
Thanks a lot !! This make
my project so much great !!!
Helpful