Code example for MatrixCursor

Methods: addRow

0
    } 
 
    public Cursor query(Uri uri, String[] projection,
                        String selection, String[] selectionArgs,
                        String sortOrder) {
        MatrixCursor c = new MatrixCursor(new String[]{"value"}, 1);
        c.addRow(new String[]{"my_value"});
        return c;
    } 
 
    public Uri insert(Uri uri, ContentValues values) {
        return null; 
    } 
 
    public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
        return 0; 
    } 
 
    public int delete(Uri uri, String selection, String[] selectionArgs) {
        return 0; 
Stop searching for code, let great code find you!  Add Codota to your java IDE