0

enter image description here

If i click on(+Add to group)Button then alert/Dialog like view should visible. How to implement view like this in android??

DevThapa
  • 173
  • 2
  • 12

2 Answers2

2

It could be simply implemented using .

Examples:

Basic Steps:

  1. Create a layout in XML for the menu.
  2. Inflate that layout and apply to the PopupWindow.
  3. Acquire a reference to that button. (i.e. Add to Groups);
  4. Find its absolute coordination on the window.
  5. Use showAtLocation to show the menu in the appropriate location.

Note: AFAIK, there's a bunch of libraries out there which fit your requirements. So, don't reinvent the wheel.

Community
  • 1
  • 1
frogatto
  • 28,539
  • 11
  • 83
  • 129
0

It's doable. You have to manually create a custom layout that automatically gets dismissed after pressing the action item.

Here is a small android library to create the QuickAction dialog style:

QuickAction Library

For more info, read this article.

Musa Y.
  • 1,747
  • 18
  • 26