Code example for SimpleCursorAdapter

Methods: getItem

0
 
			@Override 
			public void onItemClick(AdapterView<?> arg0, View arg1, int position,
					long arg3) {
				Log.e("shashank","clicked");
				selectedName = ((Cursor)adapter.getItem(position)).getString(1);
				finish(); 
			} 
		}); 
    } 
 
    /** 
     * Obtains the contact list for the currently selected account. 
     * 
     * @return A cursor for for accessing the contact list. 
     */ 
    private Cursor getContacts()
    { 
        // Run query 
        Uri uri = ContactsContract.Contacts.CONTENT_URI;
        String[] projection = new String[] {