How can I figure out what I selected from a dynamically populated listview?

by yun » Tue, 01 Apr 2008 11:48:12 GMT


Sponsored Links
 Hi,

I have a listview of "recipes" which is dynamically populated from a
database of recipes. If I select a recipe, it should take me to a page
containing that recipe's details. However, since its dynamically
populated, there is no id on the"recipe" textview, so I wouldn't know
which recipe was actually selected. Currently I'm using this hacky
method of counting the number of times the user pushes Keypad_up/down,
but there has got to be a better way to do this.

Thanks,
yun
--~--~---------~--~----~------------~-------~--~----~



How can I figure out what I selected from a dynamically populated listview?

by [EMAIL PROTECTED] » Tue, 01 Apr 2008 14:24:05 GMT


 Use listview.getSelectedItem() or something like that to retrieve the
dataobject related to the selected item.



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


Sponsored Links


How can I figure out what I selected from a dynamically populated listview?

by yun » Tue, 01 Apr 2008 16:50:06 GMT


 getSelectedItem() returns the listview.




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



Other Threads

1. difference between Linearlayout and Relativelayout

Hi

I`ve  just started learning Android programming.

I wanna know about differences between LinearLayout and
RelativeLayout.

I hope that someone can answer to my question.

thanks for read this.

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

2. Deployment

Hi,
   I'm not sure how to deploy the application to the real device. When
I tried to install it via the browser, the browser always tell me the
phone doesn't know this type or format, and doesn't download it.
   So is it really need to post the application to the "Market" for
user to get it? Just like what iPhone does?
Regards,
Eddie

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

3. Preferences Error

4. Logon to spreadsheets.google.com

5. Is collapse /expand list not working in 1.0?

6. Help: How to close an App?

7. Interconnecting Emulator Instances: