Code example for Cursor

Methods: getBlobgetString

0
        populateBookmarkItem(mAdapter.getItem(info.position), header);
        menu.setHeaderView(header);
    } 
 
    private void populateBookmarkItem(Cursor cursor, BookmarkItem item) {
        item.setName(cursor.getString(SNAPSHOT_TITLE));
        item.setUrl(cursor.getString(SNAPSHOT_URL));
        item.setFavicon(getBitmap(cursor, SNAPSHOT_FAVICON));
    } 
 
    static Bitmap getBitmap(Cursor cursor, int columnIndex) {
        byte[] data = cursor.getBlob(columnIndex);
        if (data == null) {
            return null; 
        } 
        return BitmapFactory.decodeByteArray(data, 0, data.length);
    } 
 
    @Override 
    public boolean onContextItemSelected(MenuItem item) {
        if (item.getItemId() == R.id.delete_context_menu_id) {