hiii when i want to retrive data from the list on the Onlistclick event.using this code.
String callno = mContactList.getAdapter().getItem(position).toString(); its retrive bellow information. android.content.contentresolver$cursorwrapperin...@43d4e598 but i want that String on which i click. in List view. Thank you . On Sun, Mar 21, 2010 at 12:23 AM, Paul Turchenko <[email protected]>wrote: > What exactly not working? > > On Mar 20, 2:34 pm, "Nandan ." <[email protected]> wrote: > > its pass bellow information to another activity > > > > android.content.contentresolver$cursorwrapperin...@43d4e598 > > > > plz help me > > > > > > > > On Sat, Mar 20, 2010 at 5:50 PM, Nandan . <[email protected]> wrote: > > > Hiii > > > > > i had used Listview to display phoneno from phonebook.now i want on the > > > onListClick event just select the phonno and pass phone no to another > > > activity. > > > but its not working . can anyone help me . my code is below. > > > Thank you very much for help. > > > > > private void populateContactList() { > > > // Build adapter with contact entries > > > Cursor cursor = getContacts(); > > > String[] fields = new String[] { > > > ContactsContract.Data.DISPLAY_NAME > > > }; > > > SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, > > > R.layout.contact_entry, cursor, > > > fields, new int[] {R.id.contactEntryText}); > > > mContactList.setAdapter(adapter); > > > mContactList.setOnItemClickListener(onListClick); > > > } > > > > > private ListView.OnItemClickListener onListClick=new > > > ListView.OnItemClickListener() { > > > @Override > > > public void onItemClick(AdapterView<?> mAdapterView, View v, > int > > > position, > > > long id) { > > > // TODO Auto-generated method stub > > > > > // I have problem in this line to select data from listview > > > > > String callno = mContactList.getAdapter().getItem(position).toString(); > > > > > Intent i=new Intent(ContactManager.this, phonebookcall.class); > > > i.putExtra(abcd, callno); > > > startActivity(i); > > > } > > > }; > > > > > -- > > > B!-!/-\\/!=$!-! > > > > -- > > B!-!/-\\/!=$!-! > > -- > 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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > > To unsubscribe from this group, send email to android-developers+ > unsubscribegooglegroups.com or reply to this email with the words "REMOVE > ME" as the subject. > -- B!-!/-\\/!=$!-! -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

