onItemSelectListener or onItemClickListener, both or none???

by kivy » Fri, 16 Jul 2010 06:53:56 GMT


Sponsored Links
 Hi there,

I have a question regarding the onSelectedItemListener and
onClickItemListener in Android. I am trying to select an item within
my GridView by clicking on it. Additionally the optionsmenu shall open
(and later I would like to select an optionmenu item that shall
trigger an action with the selected GridView item, e.g. I select an
item, the menu opens, I click Email and this opens the phone's email
app and attaches the item directly to a new email).

When I use the onClickItemListener together with openOptionsMenu();
the menu opens, but the item doesn't get selected.

Now, when I use the onSelectedItemListener I cannot click on the item
on the emulator's "touchscreen" to select it but have to use the
phone's keys.

Is there any way to combine both things, so that I select a GridView
item on the touchscreen, open the options menu, click an menu item and
e.g. attach the selected item to an email?

If someone could help me with that, that would be fantastic. Thank you.

--



Other Threads

1. Disable battery charghing while connected to USB

In the USB wire, there are 4 wires... Data in, Data out, Ground, and +5V.
+5V is usually RED. open up the wire and disconnect the red one and it won't
charge.






--~--~---------~--~----~------------~-------~--~----~

2. Find loaded activity - question

Hi all!

I have some tab activity "A" which is application main activity.
not hosted inside my tab host. "B" is openening activity "C" etc.
How can I find and back to already loaded tab activity "A" and show
it?

Thanks
--~--~---------~--~----~------------~-------~--~----~

3. displaying a line shape as a gradient

4. WebView as a child of an ExpandableList - Possible?

5. Question about Java coding good practice - Inner classes

6. Stackable Tabs?

7. Disable battery charghing while connected to USB