Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customise context menu like pinterest menu

I've been looking for something like Pinterest menu whenever item in GridView is pressed. I know it's too broad question. But little strike on question will provide a correct way to achieve these.

Que:

How one can implement customise context menu like Contacts+ or Pinterest Context menu on GridView item?

Pinterest Context MenuContacts+ Context Menu

Tried:

ArcMenu : But they are replacement of Slider Menu or Pop up Menu for overall Application. I want menu which can be created onFly for GridView Item.

Satellite Menu : Same as ArcMenu, replacement of Slider Menu or Pop up Menu for overall Application.

Please enlighten me to achieve behaviour like these.

like image 427
Vikalp Patel Avatar asked May 18 '14 04:05

Vikalp Patel


1 Answers

I think instead of Context Menu you can use PopupWindow for your requirement.

 //Custom popup view
View view= layoutInflater.inflate(R.layout.popupview, null);  
PopupWindow popupWindow = new PopupWindow(
               view, 
               LayoutParams.WRAP_CONTENT,  
                     LayoutParams.WRAP_CONTENT);

//Display popup window on clicking anything
//Displays pop up window near button with offsets 10 and -10
popupWindow.showAsDropDown(button, 10, -10);

For more info

http://developer.android.com/reference/android/widget/PopupWindow.html

http://android-er.blogspot.in/2012/03/example-of-using-popupwindow.html

like image 187
Abhishek V Avatar answered Sep 23 '22 02:09

Abhishek V