Code example for CursorAdapter

Methods: getItem

    /** {@inheritDoc} */ 
    protected void onListItemClick(ListView l, View v, int position, long id) {
        // Launch viewer for specific vendor 
        final Cursor cursor = (Cursor)mAdapter.getItem(position);
        final String vendorId = cursor.getString(VendorsQuery.VENDOR_ID);
        final Uri vendorUri = Vendors.buildVendorUri(vendorId);
        startActivity(new Intent(Intent.ACTION_VIEW, vendorUri));
     * {@link CursorAdapter} that renders a {@link VendorsQuery}. 
    private class VendorsAdapter extends CursorAdapter {
        public VendorsAdapter(Context context) {
            super(context, null);
        /** {@inheritDoc} */ 
Stop searching for code, let great code find you!  Add Codota to your java IDE