Android :: How To Display Images In Activity's Context Menu?
Jan 20, 2009
Does someone know how to display images in an activity's context menu? I've tried setIcon(resId) and it doesn't work (although it does work in the Options Menu).
View 2 Replies
Jun 22, 2009
i have dialog style activity android:theme="@android:style/Theme.Dialog"The menu appears about 50 px from the bottom of this dialog. So if activity screen is too small - it right in the middle of the screen. Is there any way to anchor menu to the bottom of the screen?
View 5 Replies
View Related
Aug 9, 2010
I have a need to capture some user input when an activity opens for the first time. I'm hoping to give the user a list of options to select from, which will be pulled in dynamically. I'll then store the selected value locally for future use. I'm not finding a way to do what I'm after and was wondering if anyone has run into this before and how they solved it.
Fantasy Football<http://chriswstewart.com/android-applications/fantasy-football/>- Android app for fantasy football fanatics and MFL owners Social Updater<http://chriswstewart.com/android-applications/social-updater/>- An easy way to send your status blast to multiple social networks
View 9 Replies
View Related
Aug 3, 2010
Please find the code sample below:
public class Abc extends Activity implements OnClickListener{
private ListView displayList;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mainlayout);
displayList =(ListView)findViewById(R.id.addressbooklistview);
addressbookAdapter = new CustomListAdapter(this,addressbookList);
displayList.setAdapter(addressbookAdapter);
registerForContextMenu(displayList);}
I am not able to invoke the context menu on long press. Please let me know any solution for the same.
View 2 Replies
View Related
Oct 18, 2010
I have list activity with custom array adapter and I can't to get context menu when make long press on list item.
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
Why I do not see context menu? What I do wrong? How to get context menu with array adapter and ListActivity.
View 1 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
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
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
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
Jun 18, 2009
Hi! I use dialog with multipleChoiseItems. Is there any way to create context menu for list of the items?
View 2 Replies
View Related
Apr 20, 2010
I have a ListView with a ContextMenu, it has one CheckBox (the CheckBox has android:focusable="false") and one TextView per row, but you can hide the TextView in the preferences menu. After doing that, the CheckBox wasn't registering the ContextMenu, so of course, why not register For Context Menu(cb) and unregisterForContextMenu(getListView())? Yes, i did that, but then, when when i call the delete command of onContextItemSelected, the app crashs. AdapterContextMenuInfo info=(AdapterContextMenuInfo)item.getMenuInfo(); db.deletarTarefa(info.id);
View 1 Replies
View Related
Mar 7, 2010
I have a context menu option that, when clicked, will load some information from the web and insert it into a database.So this is a lengthy process and I would like to display a progressdialog over the top of the context menu when this option is selected.I've got the progressdialog running now, but it won't show up.It's almost like the context menu is covering it.So is there a way that I could get the progressdialog to show up on top of the context menu and be visible to the user.
View 2 Replies
View Related
Nov 8, 2010
I have created one music app. In this app, i have loaded albums dynamically by using URL request and displayed as table layout. For each table row i registered context menu. But when the context menu is appeared by long press on each table row i could not find on which table row the context menu is appeared. If anyone know please guide me to solve this problem.
View 2 Replies
View Related
Dec 10, 2009
I have a ListView with 5 items. Each of the items can be long pressed to open a Context Menu. The Menu has 5 options and I want them to be selectable, by having a check box. I know of the multiple choice listview but was not sure how to have this checkbox feature in a ContextMenu.Does anyone know if this is possible and if so, how?
View 4 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
Jul 26, 2010
I have a context menu that starts to do some calculations when you press one of the context menu items.While the calculations are made I have a progressbar that I want to show. The progressbar is called from the calculations() method. The problem is that I can only see the context menu while the calculations are being made and the phone is more or less frozen.
View 3 Replies
View Related
Feb 7, 2010
if google voice is installed on your phone, when you dial a phone number a context menu pops up asking if you want to dial with or without google voice. I would like to accomplish the same task for dialing a number or sending a text message. Does the API allow you to do that?It seems there is a process_outgoing_calls, in the permissions manifest, but is there anything for the SMS?
View 2 Replies
View Related
May 14, 2010
I'm trying to add a context menu to my ExpandableListView. I've implemented onCreateContextMenu() and onContextItemSelected() but if I hold my finger on a menu item context menu doesn't appear. What's my mistake?
View 1 Replies
View Related
Aug 22, 2010
I have a ListActivity with a list of names (Jacob, Will, Matt, etc.). I have a contextMenu which gives the user the option to edit or delete the person. I know how to find the id to perform the edit and delete functionality, but I can't figure out how to get the person's name to be added to the intent extras or to add a toast when a delete occurs.
Here is a snippet of code that I'm using for the context menu: Code...
View 2 Replies
View Related
Nov 13, 2010
I've been working at this all day, and I'm really close but just can't get this to work. I have a button that pulls up an AlertDialog populated with saved entries that include Name and Price. Right now, I can click an item in the Dialog and have it automatically fill in the Name and Price fields in my activity. I want to also be able to long press an item and receive an option to delete it. This is my first try at an Android app, and a lot of this is repurposed from the Notepad Tutorial. Two things I can't figure out:
1) Is my registerForContextMenu sufficient/correct?
2) What am I doing wrong with my onCreateContextMenu? Code...
View 1 Replies
View Related
Jun 22, 2010
I have two activities that both contain an identical context menu built programmatically using menu.add(int, int, int, CharSequence). They both use onCreateContextMenu and onContextItemSelected.
The first Activity contains a ListView, when the user long presses on an item the context menu appears for that item. The second Activity (a detail screen for each item in Activity 1) contains a button, when the user presses the button the context menu appears.
I'd like to share the code that creates the context menu between these activities. The only thing these activities share is the context menu, so it seems like a bit of overkill to create a superclass (e.g., ActivityOne extends ContextMenuActivity) that defines onCreateContextMenu and onContextItemSelected methods.
Is there a better way of sharing these methods between activities?
View 2 Replies
View Related
Sep 6, 2010
Having a little trouble working out how to have a context menu working in my GLSurfaceView view. There doesn't seem to be a "onCreateOptionsMenu" or "onOptionsItemSelected" to override. I do notice a "setOnCreateContextMenuListener" but I don't know how to use it.
View 5 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
May 6, 2010
I have a View that extends Activity. A ListView will display a number of listitems. When the user long clicks I would like to present them with a contextmenu allowing them to select edit, delete etc. and then identify the listitem that was selected as the item to perform the action on.
In onCreate I have:
listView.setAdapter(adapter);
listView.setOnItemClickListener(onListClick);
listView.setOnItemLongClickListener(onListLongClick);
registerForContextMenu(listView);
I have a method onCreateContextMenu
@Override
public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo);
menu.setHeaderTitle("Context Menu");
menu.add(0, v.getId(), 0, "Edit");
menu.add(0, v.getId(), 0, "Delete");
and also onContextItemSelected
@Override
public boolean onContextItemSelected(MenuItem item) {
if (item.getTitle() == "Edit") {
// edit action
} else if (item.getTitle() == "Delete") {
// delete action
} else {
return false;
return true;
}I am not sure where to go from here to get the correct row/listitem.
View 1 Replies
View Related
Jan 8, 2010
I'm writing a program where the user's finger will often linger on the screen for more than the couple of seconds it takes for the context menu to activate. I have a class that controls when this should happen, but I seem to be unable to launch the context menu manually. As a last resort I decided to register the context menu just before running openContextMenu(View) and while this /did/ grant me a context menu, it subsequently disabled the calls to onTouchEvent when the user touches the screen, rendering the program unusable after showing the context menu. What is the correct way of manually opening the context menu? Why does onTouchEvent suddenly stop receiving events?
View 2 Replies
View Related
Aug 4, 2010
How can I open a context menu for a view without registering it using registerForContextMenu()?
My activity overrides onTouchEvent to detect motion, and if I use registerForContextMenu() it stops working. I'm detecting a long press, so I'd like to forward that request to a method that would build the menu for me, but don't know if it can work that way.
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