On Thu, Mar 4, 2010 at 5:44 PM, -DC- <[email protected]> wrote:

> Great, but I'm not sure how I use it. Can you provide some sample code
> based on what I've currently got (below)?
>

The link I gave you is for setting an ItemSelectedListener. So step one is
to actually create one:

OnItemSelectedListener oisl = new OnItemSelectedListener()
{
 @Override
 onItemSelected(AdapterView<?> parent, View view, int position, long id)
 {
  // Here you get the index of the item that was clicked, do what you need

 }
}

Then just set it:
mDirectories.setOnItemClickListener(oisl);

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to