How to implement popmenu layout

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

How to implement popmenu layout

Postby jagtap.jj1 » Wed Aug 27, 2008 12:14 pm

Hi
I want implement popup menu , can anybudy tel me how to implement it ;
so that when I click on main menu there should be popup list of menu item.

jalandar jagtap

jagtap.jj@gmail.com
jagtap@igloo360.com

thank u
java-android developer
User avatar
jagtap.jj1
Senior Developer
Senior Developer
 
Posts: 124
Joined: Fri Aug 22, 2008 11:52 am
Location: India(Mumbai)

Top

submenus?

Postby ninor » Thu Aug 28, 2008 5:22 pm

There is the possibility of submenus inside menus, but I don't think there's anything to pop a view up from the Options Menu. (I haven't seen any class/utility to do that)
User avatar
ninor
Moderator
Moderator
 
Posts: 180
Joined: Thu Aug 14, 2008 6:30 pm
Location: Barcelona, Spain

there is no solution for this opration

Postby jagtap.jj1 » Thu Sep 04, 2008 6:16 am

ninor wrote:There is the possibility of submenus inside menus, but I don't think there's anything to pop a view up from the Options Menu. (I haven't seen any class/utility to do that)


There is no solution for this opration , how to implement this functionality with android.
java-android developer
User avatar
jagtap.jj1
Senior Developer
Senior Developer
 
Posts: 124
Joined: Fri Aug 22, 2008 11:52 am
Location: India(Mumbai)

Postby plusminus » Thu Sep 04, 2008 8:46 pm

Search for ContextMenus. I think I have a tutorial somewhere on here (but for m5).for m5)

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

which method for context menu implementation

Postby jagtap.jj1 » Sat Sep 06, 2008 4:48 pm

Thank u for your valuable help.

Just u used setOnPopulateContextMenuListener() for list view in your tutorials
which is method for OptionsMenu-Item ,so that on clicking on item there should be context menu.
I am not getting that method ,when I use same method (above) it gives error.


thank u
jagtap

jagtap.jj@gmail.com
java-android developer
User avatar
jagtap.jj1
Senior Developer
Senior Developer
 
Posts: 124
Joined: Fri Aug 22, 2008 11:52 am
Location: India(Mumbai)

Context menu for menu item

Postby jagtap.jj1 » Mon Sep 08, 2008 8:05 am

I want to use context menu for menu item , So that when I long press menu item there should be context menu
presently I am using following code ,which gve the error.


item.setOnPopulateContextMenuListener(new OnPopulateContextMenuListener() {

@Override
public void onPopulateContextMenu(ContextMenu conMenu, View arg1, Object arg2) {
conMenu.setHeader("ContextMenu");
conMenu.add(0, CONTEXTMENU_DELETEITEM, "Delete this favorite!");
/* Add as many context-menu-options as you want to. */
}
});


this gives the error OnPopulateContextMenuListener cannot be resolved to a type
plz suggest me solution
thank u
jagtap jalandar
mail: jagtap.jj@gmail.com
java-android developer
User avatar
jagtap.jj1
Senior Developer
Senior Developer
 
Posts: 124
Joined: Fri Aug 22, 2008 11:52 am
Location: India(Mumbai)

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 6 guests