Floating Context Menu (Long Click Menu) - Android Studio Tutorial

Опубликовано: 12 Декабрь 2017
на канале: Coding in Flow
92,047
1.2k

In this video we will learn, how to create a floating context menu, which will appear when we long click on a particular view or item.
For this we will create a menu xml file, override onCreateContextMenu to inflate this menu, use the registerForContextMenu method to set it on a TextView and finally handle clicks by overriding onContextItemSelected and check for the ID of the clicked item.
Lastly we will learn, how to add a header title to our floating context menu by using the setHeaderTitle method.

Source code:
https://gist.github.com/codinginflow/...

____________________
💻 Find the BEST programming tutorials on TutHub:
https://tuthub.io

⭐ Get my MVVM Caching Course now:
https://codinginflow.com/caching

❗ Subscribe to the channel:
   / codinginflo.  .

📨 Subscribe to the Coding in Flow newsletter:
https://codinginflow.com/newsletter

❓ Join our free developer community:
  / discord  

📣 Follow Coding in Flow on other sites:
Facebook:   / codinginflow  
Instagram:   / codinginflow  
TikTok:   / codinginflow  
Twitter:   / codinginflow  
Github: https://github.com/codinginflow

💰 Business requests, sponsoring, etc.: info@codinginflow.com


На этой странице сайта вы можете посмотреть видео онлайн Floating Context Menu (Long Click Menu) - Android Studio Tutorial длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Coding in Flow 12 Декабрь 2017, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 92,047 раз и оно понравилось 1.2 тысяч зрителям. Приятного просмотра!