List of usage examples for android.database DatabaseUtils cursorIntToContentValues
public static void cursorIntToContentValues(Cursor cursor, String field, ContentValues values, String key)
From source file:com.money.manager.ex.reports.PayeeReportFragment.java
private Payee getPayeeFromSelectedItem(ListView l, int position) { // Reading item from the list view, not adapter! Object item = l.getItemAtPosition(position); if (item == null) return null; Cursor cursor = (Cursor) item; Payee payee = new Payee(); // payee.loadFromCursor(cursor); // The fields are different! Can't use standard loadFromCursor. DatabaseUtils.cursorIntToContentValues(cursor, ViewMobileData.PAYEEID, payee.contentValues, Payee.PAYEEID); DatabaseUtils.cursorStringToContentValues(cursor, ViewMobileData.PAYEE, payee.contentValues, Payee.PAYEENAME);//from w w w .j a va 2 s. c o m return payee; }