The parameter named "position" to onItemClick() is your position. In terms of how to get "value 'C'", that depends on what list is.
On Fri, Feb 4, 2011 at 10:46 AM, Mystique <[email protected]> wrote: > I have the following, how do I get current position, value C during > onItemClick? > Many Thanks. > > adapterS = new SimpleAdapter(this, list, R.layout.sort_by_name, > new String[] {"A","B", "C"}, > new int[] {R.id.A, R.id.B, R.id.C} > ); > > lv.setAdapter(adapterS); > > --- > lv.setOnItemClickListener(new OnItemClickListener() { > @Override > public void onItemClick(AdapterView<?> a, View v, int position, long > id) { > > // What do I need to do here to get current position, value C? > > } > }); > } > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in Atlanta: http://bignerdranch.com/classes/android -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

