If i click on(+Add to group)Button then alert/Dialog like view should visible. How to implement view like this in android??
Asked
Active
Viewed 254 times
2 Answers
2
It could be simply implemented using android-popupwindow.
Examples:
- http://mrbool.com/how-to-implement-popup-window-in-android/28285
- Is there a simple example of the PopupWindow class using Android v2.0?
Basic Steps:
- Create a layout in XML for the menu.
- Inflate that layout and apply to the
PopupWindow
. - Acquire a reference to that button. (i.e. Add to Groups);
- Find its absolute coordination on the window.
- 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.
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:
For more info, read this article.

Musa Y.
- 1,747
- 18
- 26