List of usage examples for android.database DatabaseUtils cursorStringToContentValues
public static void cursorStringToContentValues(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 ww.j a v a 2s .c o m*/ return payee; }