Cursor copyStringToBuffer - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Cursor copyStringToBuffer method.

This code example shows how to use the following methods:copyStringToBuffer, getLong, getString
 
        @Override 
        public void bindView(View view, Context context, Cursor cursor) {
            final ContactListItemCache cache = (ContactListItemCache) view.getTag();
            // Set the name 
            cursor.copyStringToBuffer(SUMMARY_NAME_COLUMN_INDEX, cache.nameBuffer);
            int size = cache.nameBuffer.sizeCopied;
            cache.nameView.setText(cache.nameBuffer.data, 0, size);
            final long contactId = cursor.getLong(SUMMARY_ID_COLUMN_INDEX);
            final String lookupKey = cursor.getString(SUMMARY_LOOKUP_KEY);
            cache.photoView.assignContactUri(Contacts.getLookupUri(contactId, lookupKey));
        } 
 
        @Override 
        public View newView(Context context, Cursor cursor, ViewGroup parent) {
            View view = super.newView(context, cursor, parent);
            ContactListItemCache cache = new ContactListItemCache();
            cache.nameView = (TextView) view.findViewById(R.id.name);
            cache.photoView = (QuickContactBadge) view.findViewById(R.id.badge);
            view.setTag(cache);
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:copyStringToBuffer
    return wrappedCursor.getString(i);
  } 
 
  @Implementation 
  public void copyStringToBuffer(int i, CharArrayBuffer charArrayBuffer) {
    wrappedCursor.copyStringToBuffer(i, charArrayBuffer);
  } 
 
  @Implementation 
  public short getShort(int i) {
    return wrappedCursor.getShort(i);
  } 
 
  @Implementation 
  public int getInt(int i) {
    return wrappedCursor.getInt(i);
  } 
 
  @Implementation 
  public long getLong(int i) {
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:copyStringToBuffer
        return wrappedCursor.getString(i);
    } 
 
    @Implementation 
    public void copyStringToBuffer(int i, CharArrayBuffer charArrayBuffer) {
        wrappedCursor.copyStringToBuffer(i, charArrayBuffer);
    } 
 
    @Implementation 
    public short getShort(int i) {
        return wrappedCursor.getShort(i);
    } 
 
    @Implementation 
    public int getInt(int i) {
        return wrappedCursor.getInt(i);
    } 
 
    @Implementation 
    public long getLong(int i) {
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:copyStringToBuffer
        } 
    } 
 
    @Override 
    public void copyStringToBuffer(int columnIndex, CharArrayBuffer buffer) {
        mActiveCursor.copyStringToBuffer(columnIndex, buffer);
    } 
 
    @Override 
    public void deactivate() { 
        for (Cursor cursor : mCursors) {
            if (cursor != null) {
                cursor.deactivate();
            } 
        } 
    } 
 
    @Override 
    public byte[] getBlob(int columnIndex) {
        return mActiveCursor.getBlob(columnIndex);
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:copyStringToBuffer, getLong
        @Override 
        public void bindView(View view, Context context, Cursor cursor) {
            ViewHolder holder = (ViewHolder) view.getTag();
 
            CharArrayBuffer buf = holder.titleBuffer;
            cursor.copyStringToBuffer(TagQuery.COLUMN_TITLE, buf);
            holder.mainLine.setText(buf.data, 0, buf.sizeCopied);
 
            holder.dateLine.setText(DateUtils.getRelativeTimeSpanString(
                    context, cursor.getLong(TagQuery.COLUMN_DATE)));
        } 
 
        @Override 
        public View newView(Context context, Cursor cursor, ViewGroup parent) {
            View view = mInflater.inflate(R.layout.tag_list_item, null);
 
            // Cache items for the view 
            ViewHolder holder = new ViewHolder();
            holder.titleBuffer = new CharArrayBuffer(64);
            holder.mainLine = (TextView) view.findViewById(R.id.title);
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:copyStringToBuffer
	return cursor.getString(columnIndex);
    } 
 
    @Implementation 
    public void copyStringToBuffer(int columnIndex, CharArrayBuffer buffer) {
	cursor.copyStringToBuffer(columnIndex, buffer);
    } 
 
    @Implementation 
    public short getShort(int columnIndex) {
	return cursor.getShort(columnIndex);
    } 
 
    @Implementation 
    public int getInt(int columnIndex) {
	return cursor.getInt(columnIndex);
    } 
 
    @Implementation 
    public long getLong(int columnIndex) {
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:copyStringToBuffer
	/* (non-Javadoc) 
	 * @see android.database.Cursor#copyStringToBuffer(int, android.database.CharArrayBuffer) 
	 */ 
	@Override 
	public void copyStringToBuffer(int columnIndex, CharArrayBuffer buffer) {
		mCursor.copyStringToBuffer(columnIndex, buffer);
	} 
 
	/* (non-Javadoc) 
	 * @see android.database.Cursor#deactivate() 
	 */ 
	@Override 
	public void deactivate() { 
		mCursor.deactivate();
	} 
 
	/* (non-Javadoc) 
	 * @see android.database.Cursor#getBlob(int) 
	 */ 
	@Override 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:copyStringToBuffer
        public void close() { 
            mDatabaseCursor.close();
        } 
 
        public void copyStringToBuffer(int columnIndex, CharArrayBuffer buffer) {
            mDatabaseCursor.copyStringToBuffer(columnIndex, buffer);
        } 
 
        public void deactivate() { 
            mDatabaseCursor.deactivate();
        } 
 
        public byte[] getBlob(int columnIndex) {
            return null; 
        } 
 
        public int getColumnIndexOrThrow(String columnName)
                throws IllegalArgumentException { 
            return 0; 
        } 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:copyStringToBuffer
	public void close() { 
		internalCursor.close();
	} 
 
	public void copyStringToBuffer(int columnIndex, CharArrayBuffer buffer) {
		internalCursor.copyStringToBuffer(columnIndex, buffer);
	} 
 
	public void deactivate() { 
		internalCursor.deactivate();
	} 
 
	public byte[] getBlob(int columnIndex) {
		return internalCursor.getBlob(columnIndex);
	} 
 
	public int getColumnCount() { 
		return internalCursor.getColumnCount();
	} 
 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:copyStringToBuffer
   public void close() { 
      internalCursor.close();
   } 
 
   public void copyStringToBuffer(int arg0, CharArrayBuffer arg1) {
      internalCursor.copyStringToBuffer(arg0, arg1);
   } 
 
   public void deactivate() { 
      internalCursor.deactivate();
   } 
 
   public byte[] getBlob(int columnIndex) {
      return internalCursor.getBlob(columnIndex);
   } 
 
   public int getColumnCount() { 
      return internalCursor.getColumnCount();
   } 
 
4
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Cursor copyStringToBuffer Questions & Answers:

copyStringToBuffer Method Overview
Retrieves the requested column text and stores it in the buffer provided.
See Code Examples for other Android Cursor Methods: