Android :: Adding Item To Global Context Menu
Feb 18, 2009
When you long press on something in Android, a context menu comes up.I want to add something to this context menu for all TextViews in the system.For example, the system does this with Copy and Paste. I would want to add my own, and have it appear in every application.
View 3 Replies
May 23, 2010
I want a user to be able to long press a contact and be offered a menu item of my own that can run an activity of my own. You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options
View 3 Replies
View Related
Mar 8, 2010
I'm trying to add custom menu items in a WebView Context Menu. Unfortunately, my items are shown in the menu of the first web page I load , but then if I load a second page, a long press only shows the standard context menu items. Mine are gone. I've put a Toast inside the code and it is displayed as well on the first loaded page, but not on the second. I'm using the code below:..............
View 6 Replies
View Related
Sep 10, 2010
Is it possible to add a custom menu item to the long-press menu that opens in any text box?
View 3 Replies
View Related
Nov 12, 2010
Can I add a new item in SMS context menu which can in turn invoke my app/activity?
View 2 Replies
View Related
Oct 6, 2009
when you long click a hyperlink of browser, you will see a context menu with 'Open, Open link in new browser, Browser Link, etc'.
is it possible to add some customized item to the context menu?
View 3 Replies
View Related
Dec 4, 2009
Does any one know how to add item to hyperlink context menu? This is a question that as already been posted here, but I didn't found any solution, and it is really useful.
View 2 Replies
View Related
Aug 27, 2010
I have a ListView and would like to remove a row item when the user long clicks on selects Remove from the context menu.
CODE:..................
How can I get a reference to the row number that was clicked, so I can remove that index from my array?
View 1 Replies
View Related
Feb 10, 2009
While Contextmenu items support calling setIcon : menu.add(0,).setIcon( R.drawable.xxx); the icon never gets displayed. Is this a bug? a feature? Is there a reasonably priced workaround for getting icons onto context menus?
View 2 Replies
View Related
Feb 25, 2010
If I have a checkable item in a Context Menu or ordianry Menu, how do I prevent the menu from closing when the item is selected?
View 2 Replies
View Related
Jul 17, 2009
I am using openContextMenu() when someone clicks on an item of a list (not when they long press as usual). The context menu does appear, however, it shows the context menu for the last item that the context menu had appeared. For example, if I long press the item C of the list then the context menu for item C appears, and later if I click on item B, with openContextMenu() the context menu for item C will again appear, not for B that I was expecting. How can I set the current item for which the context menu will appear to be the item of the list the user clicks on? I do have the position from onListItemClick() and I was trying to find a call like setContextMenuItem() or something, but I can't find anything.
View 7 Replies
View Related
Aug 27, 2009
In my application has a ListView. When long press on item the "Context Menu" will appear. I want to check the data ID, then set disable/enable to my Context Menu "Items". I can not find out the function like getMenuInfo() or something like this.
@Override
public void onCreateContextMenu(ContextMenu menu , View v, ContextMenuInfo menuInfo)
{ super.onCreateContextMenu(menu, v, menuInfo);
menu.add(0, ADD_FAVORITE_ID, 0, "Check");
menu.add(0, ADD_FAVORITE_ID, 0, "UnCheck").setEnabled(false);}
View 1 Replies
View Related
Nov 9, 2010
Can anyone kindly guide as to how can I invoke a context menu on the press of a menu item. I googled a lot for the same, but nothing turned up. Look forward for your valuable help.
View 1 Replies
View Related
Jan 22, 2010
Context Menu seems quite handy as long as we are using an AdapterView as we can easily get selected item position in onContextItemSelected from AdapterContextMenuInfo.position Any idea how we can achieve something similar in a TableLayout? In my TableLayout, i have some TableRow and i would like to get the row index in the onContextItemSelected callback like i would do with a simple ListView. I guess i will have to register the contextmenu for each row? but how can tie the row index with the menu? i see no way to do it with registerForContextMenu.
View 2 Replies
View Related
Sep 16, 2010
Trying to set ContextMenu title according to the ListView clicked item.The ListView contains Bookmarks list -> FAVICON + BOOKMARK TITLE @Override public void onCreate Context Menu (Context Menu menu, View v, ContextMenuInfo menuInfo) {super.onCreateContextMenu(menu, v, menuInfo); menu.add(0, EDIT_ID, 0, R.string.menu_edit); menu.add(0, DELETE_ID, 0, R.string .menu_delete); menu.add(0, SHARE_ID, 0, R.string.menu_share); AdapterView. Adapter ContextMenuInfo info = (AdapterView.AdapterContextMenuInfo)menuInfo; View itemID = (info.targetView); menu.setHeaderTitle("bla" + itemID);when I run this code it shows the android.widget.RelativeLayout@423d2389 or whatever and if I change the itemID to String itemID = ((TextView) info.targetView).getText().toString(); I get force close on long click even though no errors are shown in Eclipse or when I run the app.I also want to get the favicon in the same way.
View 1 Replies
View Related
Sep 21, 2010
Is it possible to have something similar like Blackberry in Android: link text. I want to add a menu item particularly to the Contacts Option menu.please let me know if this can be done in android.
View 1 Replies
View Related
Sep 1, 2010
I wish to add an option of 'SEND' to the context menu of Contacts. Is it possible to extend the ContextMenu Activity? or is there any other option for the same?
View 1 Replies
View Related
Oct 28, 2010
I have button, which displays a Context menu. In the menu are few items (some of them are disabled - setEnabled(false)).
Which event is called when a user click on the disabled item? It's not onContextItemSelected nor onContextMenuClosed. But the menu is closed after the click.
View 1 Replies
View Related
Aug 12, 2010
Is it possible to add a menu item to the default calendar app for Android? if so, how do i go about doing this?
View 2 Replies
View Related
May 30, 2013
I use sipdroid for certain business calls, but i dont want to chose every time "use dialer or sipdroid when i click on a contact". I want to use my regular phone by default and i want to be able to long click on a contact and select call via sipdroid when i feel like it.
View 1 Replies
View Related
Nov 18, 2010
I have a context menu that I apply for a ListView that simply allows the user to move items up or down, or delete the item.
I have code in onContextItemSelected() to prevent things from moving up past top or bottom of the list, etc., but I'd rather hide the context menu items in the first place if (for instance) the top item in the list is selected.
I assume that I need to do this in onCreateContextMenu, but I'm not sure how.
Here is my onCreateContextMenu code:.....................
View 2 Replies
View Related
Oct 22, 2009
Can someone please help me find which item was long clicked in this method i need to determine which item was clicked so that if it is a favorite or not already i can change the "Add to Favorites" accordingly. Code...
View 3 Replies
View Related
Jan 21, 2010
How can I launch a contextmenu from a contextmenu? I'm trying to replicate the MediaPlayer action that happens when you long click a song, then click "Add to playlist" in the resulting contextmenu. When you click that menu item, another contextmenu pops up with "Add to playlist" as the title, and "Current playlist", "New", and however-many-playlists-you-have defined after that.
View 4 Replies
View Related
Jun 2, 2010
How can i define each menu item in different line? Right now if I'm adding 4 items they will get the form of 2X2. Is there a way to add them differently? Like 1 item and 3 below it? or 1X4?
View 1 Replies
View Related
Mar 13, 2010
I am creating a context menu in separate class from the listview, because the contextmenu will be access by several listviews in different classes. Whenever I long-click the listview, contextmenu pops up, but nothing happens when the options were chosen. Tried to look at logcat message and it said something like this:
Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43c488f8
Any idea what really causing this problem? cause it works perfectly fine if i put the contextmenu on the same class as listview.
View 13 Replies
View Related
Feb 8, 2010
Duplicate: static options menu
I know how to create a menu in my application with an icon and text on each "button" of the menu, but this menu is only visible on the activity where I created it...
I would like to know if it is possible to create a global menu which would be accessible from all activities?
View 1 Replies
View Related
Nov 19, 2010
I have an Options menu up and running in my Android application and I've overridden the onCreateOptionsMenu, onOptionsItemSelected and onPrepareOptionsMenu methods to customize the menu a little. My question is related to keeping the Options menu open after the user clicks on a menu item. Basically, I'd like to be able to hide the menu until the user clicks on the device menu key. Once the user clicks on this key, I'd like to be able to hold the menu in place regardless of how many times the user clicks on menu items. If the user wants to hide the Options menu, they'd just need to click on the device menu key again. Is this type of interaction supported (or even advisable).
View 1 Replies
View Related
Oct 25, 2009
the difference between context menu and option menu in android? When I click the menu button on the emulator, is that option menu? or context menu? And how to invoke the other menu (not trigger by the menu button)?
View 2 Replies
View Related
Nov 24, 2010
i have got a stupid question to ask. I created a custom ContextMenu. But when i call the menu, the menu displayed will also have the default menu added in. Is there anyway for the default ContextMenu not to appear as well?Code requested: @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo)
super.onCreateContextMenu(menu, v, menuInfo);
MenuInflater inflater = getMenuInflater();
menu.setHeaderTitle("Recipients");
inflater.inflate(R.menu.menu_contacts, menu);
View 1 Replies
View Related
Mar 3, 2013
This is the code I am using with reboot mod, replacing hotboot "pkill" command.
:try_start_27
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v0
const/4 v3, 0x2
new-array v4, v3, [Ljava/lang/String;
const/4 v5, 0x0
[Code] .....
It seems to be fine, as it doesn't break anything, but the script won't start.
View 1 Replies
View Related