You are going to need to provide a little more information if you want a "real" answer. I'm assuming you are using a ListActivity? If so, there is a method called onListItemClick that passes a position parameter.
Assuming that the items are displayed in the list in the same order as the array you could then just do something like the following to get the correct value: public void onListItemClick<http://developer.android.com/reference/android/app/ListActivity.html#onListItemClick%28android.widget.ListView,%20android.view.View,%20int,%20long%29> (ListView<http://developer.android.com/reference/android/widget/ListView.html>l, View <http://developer.android.com/reference/android/view/View.html> v, int position, long id) { String val = values[position]; //Display the val somehow.... } And, really, it took me about 10 seconds to look in the docs and see that ListActivity has this method. Not sure if you had done any searching or anything to begin with (and if you have you can ignore this slight rebuke) but I would highly recommend doing at least a little homework and try to figure out the answer yourself before posting in the future... Some people can get pretty mean on here (admittedly I used to be one of them but I'm trying to be a little nicer...) Hope that helps for now, Justin ---------------------------------------------------------------------- There are only 10 types of people in the world... Those who know binary and those who don't. ---------------------------------------------------------------------- On Tue, Apr 20, 2010 at 12:25 AM, Prashant Shelar <[email protected]>wrote: > Hello, > > I have a two string arrays: > String[] keys={"A","B","C","D","E"}; > String[] values={"655","466","627","168","569"}; > > Now i wanted to display a list: > ---------------------------- > A > ---------------------------- > B > ---------------------------- > C > ---------------------------- > D > ---------------------------- > E > ---------------------------- > > When user clicks on any of above list item i wanted to show a values > associated with it. > > That means i need to bind values with each corresponding list item. > > I searched this group but not getting exact right direction or may be > am thing in wrong direction. > > Thanks, > Prashant. > > -- > 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]<android-beginners%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-beginners?hl=en > -- 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

