Code example for SimpleCursorAdapter

Methods: getItem

0
 
    @Override 
    public void onListItemClick(ListView l, View v, int position, long id) {
 
        // Get the title of the selected item and notify the callback 
        Cursor c = (Cursor) mAdapter.getItem(position);
        String title = c.getString(c.getColumnIndex(projection[1]));
        mCallback.onPoiSelected(title);
    } 
 
    @Override 
    public Loader<Cursor> onCreateLoader(int id, Bundle args) {
        // create a new cursor loader that retrieves a list of all POIs. 
        return new PoiCursorLoader(getActivity(), projection);
 
    } 
 
    @Override 
    public void onLoadFinished(Loader<Cursor> loader, Cursor c) {
        // set the new cursor 
Experience pair programming with AI  Get Codota for Java