当前位置: 首页>>代码示例>>Java>>正文


Java CharArrayBuffer类代码示例

本文整理汇总了Java中android.database.CharArrayBuffer的典型用法代码示例。如果您正苦于以下问题:Java CharArrayBuffer类的具体用法?Java CharArrayBuffer怎么用?Java CharArrayBuffer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CharArrayBuffer类属于android.database包,在下文中一共展示了CharArrayBuffer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: copyStringToBuffer

import android.database.CharArrayBuffer; //导入依赖的package包/类
@Override
public void copyStringToBuffer(int columnIndex, CharArrayBuffer buffer) {
    // Default implementation, uses getString
    String result = getString(columnIndex);
    if (result != null) {
        char[] data = buffer.data;
        if (data == null || data.length < result.length()) {
            buffer.data = result.toCharArray();
        } else {
            result.getChars(0, result.length(), data, 0);
        }
        buffer.sizeCopied = result.length();
    } else {
        buffer.sizeCopied = 0;
    }
}
 
开发者ID:requery,项目名称:sqlite-android,代码行数:17,代码来源:AbstractCursor.java

示例2: newView

import android.database.CharArrayBuffer; //导入依赖的package包/类
@Override
public View newView(Context context, Cursor cursor, ViewGroup parent) {
    View v = super.newView(context, cursor, parent);
    
    ViewHolder vh = new ViewHolder();
    vh.line1 = (TextView) v.findViewById(R.id.line1);
    vh.line1.setTextAppearance(NowPlayingActivity.this, android.R.style.TextAppearance_Medium);
    vh.line2 = (TextView) v.findViewById(R.id.line2);
    vh.line2.setTextAppearance(NowPlayingActivity.this, android.R.style.TextAppearance_Small);
    vh.duration = (TextView) v.findViewById(R.id.duration);
    TypedValue tv = new TypedValue();
    if (getTheme().resolveAttribute(android.R.attr.textColorPrimary, tv, true)) {
    	vh.duration.setTextColor(context.getResources().getColor(tv.resourceId));
    }
    vh.play_indicator = (ImageView) v.findViewById(R.id.play_indicator);
    vh.buffer1 = new CharArrayBuffer(100);
    vh.buffer2 = new char[200];
    vh.icon = (RecyclingImageView) v.findViewById(R.id.icon);
    v.setTag(vh);
    return v;
}
 
开发者ID:wseemann,项目名称:ServeStream,代码行数:22,代码来源:NowPlayingActivity.java

示例3: copyStringToBuffer

import android.database.CharArrayBuffer; //导入依赖的package包/类
public void copyStringToBuffer(int columnIndex, CharArrayBuffer buffer) {
    checkPosition();

    if (columnIndex == mDeltaColumn) {
        long value = getDeltaValue();
        String strValue = Long.toString(value);
        int len = strValue.length();
        char[] data = buffer.data;
        if (data == null || data.length < len) {
            buffer.data = strValue.toCharArray();
        } else {
            strValue.getChars(0, len, data, 0);
        }
        buffer.sizeCopied = strValue.length();
    } else {
        mInnerCursor.copyStringToBuffer(columnIndex, buffer);
    }
}
 
开发者ID:zom,项目名称:Zom-Android,代码行数:19,代码来源:ConversationView.java

示例4: newView

import android.database.CharArrayBuffer; //导入依赖的package包/类
@Override
public View newView(Context context, Cursor cursor, ViewGroup parent) {
    View v = super.newView(context, cursor, parent);
    ImageView iv = (ImageView) v.findViewById(R.id.icon);
    iv.setVisibility(View.GONE);
    
    ViewHolder vh = new ViewHolder();
    vh.line1 = (TextView) v.findViewById(R.id.line1);
    vh.line2 = (TextView) v.findViewById(R.id.line2);
    vh.duration = (TextView) v.findViewById(R.id.duration);
    vh.play_indicator = (ImageView) v.findViewById(R.id.play_indicator);
    vh.buffer1 = new CharArrayBuffer(100);
    vh.buffer2 = new char[200];
    v.setTag(vh);
    return v;
}
 
开发者ID:AndroidLearnerchn,项目名称:Android-Application-Using-CAF-Library,代码行数:17,代码来源:TrackBrowserActivity.java

示例5: copyStringToBuffer

import android.database.CharArrayBuffer; //导入依赖的package包/类
/**
 * copy the text for the given field in the provided char array.
 * 
 * @param row the row to read from, row - getStartPosition() being the actual row in the window 
 * @param col the column to read from
 * @param buffer the CharArrayBuffer to copy the text into,      
 * If the requested string is larger than the buffer 
 * a new char buffer will be created to hold the string. and assigne to
 * CharArrayBuffer.data
  */
public void copyStringToBuffer(int row, int col, CharArrayBuffer buffer) {
    if (buffer == null) {
        throw new IllegalArgumentException("CharArrayBuffer should not be null");
    }
    if (buffer.data == null) {
        buffer.data = new char[64];
    }
    acquireReference();
    try {
        char[] newbuf = copyStringToBuffer_native(
                row - mStartPos, col, buffer.data.length, buffer);
        if (newbuf != null) {
            buffer.data = newbuf;
        }
    } finally {
        releaseReference();
    }
}
 
开发者ID:itsmechlark,项目名称:greendao-cipher,代码行数:29,代码来源:CursorWindow.java

示例6: newView

import android.database.CharArrayBuffer; //导入依赖的package包/类
@Override
public View newView(Context context, Cursor cursor, ViewGroup parent) {
    View v = super.newView(context, cursor, parent);
    ViewHolder vh = new ViewHolder();
    vh.line1 = (TextView) v.findViewById(R.id.line1);
    vh.line2 = (TextView) v.findViewById(R.id.line2);
    vh.duration = (TextView) v.findViewById(R.id.duration);
    vh.buffer1 = new CharArrayBuffer(100);
    vh.buffer2 = new char[200];
    v.setTag(vh);
    return v;
}
 
开发者ID:archos-sa,项目名称:aos-Video,代码行数:13,代码来源:VideoPicker.java

示例7: newView

import android.database.CharArrayBuffer; //导入依赖的package包/类
@Override
public View newView(Context context, Cursor cursor, ViewGroup parent) {
    View v = super.newView(context, cursor, parent);
    ViewHolder vh = new ViewHolder();
    vh.line1 = (TextView) v.findViewById(R.id.line1);
    vh.line2 = (TextView) v.findViewById(R.id.line2);
    vh.duration = (TextView) v.findViewById(R.id.duration);
    vh.radio = (RadioButton) v.findViewById(R.id.radio);
    vh.play_indicator = (ImageView) v.findViewById(R.id.play_indicator);
    vh.buffer1 = new CharArrayBuffer(100);
    vh.buffer2 = new char[200];
    v.setTag(vh);
    return v;
}
 
开发者ID:tgmarinho,项目名称:apps-for-android,代码行数:15,代码来源:MusicPicker.java

示例8: testCopyStringToBuffer

import android.database.CharArrayBuffer; //导入依赖的package包/类
@Test
public void testCopyStringToBuffer() {
	final Cursor emptyCursor = EmptyCursor.create();
	final CharArrayBuffer buffer = new CharArrayBuffer(0);
	for (int i = 0; i < 10; i++) {
		emptyCursor.copyStringToBuffer(i, buffer);
	}
	assertThat(buffer.sizeCopied, is(0));
}
 
开发者ID:universum-studios,项目名称:android_database,代码行数:10,代码来源:EmptyCursorTest.java

示例9: copyStringToBuffer

import android.database.CharArrayBuffer; //导入依赖的package包/类
@Override
public void copyStringToBuffer(int columnIndex, CharArrayBuffer buffer) {
    for (int chance = 0; chance < LOCK_RETRY_CHANCES; chance++) {
        try {
            cursor.copyStringToBuffer(columnIndex, buffer);
        } catch (RuntimeException e) {
            if (!isSQLiteDatabaseLockedException(e)) {
                throw e;
            }
        }
    }
}
 
开发者ID:zzwwws,项目名称:RxZhihuDaily,代码行数:13,代码来源:LockSafeCursor.java

示例10: getScoreHolderDisplayName

import android.database.CharArrayBuffer; //导入依赖的package包/类
public final void getScoreHolderDisplayName(CharArrayBuffer paramCharArrayBuffer)
{
  if (this.vS == null)
  {
    fc.b(this.vP, paramCharArrayBuffer);
    return;
  }
  this.vS.getDisplayName(paramCharArrayBuffer);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:10,代码来源:d.java

示例11: getScoreHolderDisplayName

import android.database.CharArrayBuffer; //导入依赖的package包/类
public final void getScoreHolderDisplayName(CharArrayBuffer paramCharArrayBuffer)
{
  if (M("external_player_id"))
  {
    a("default_display_name", paramCharArrayBuffer);
    return;
  }
  this.vU.getDisplayName(paramCharArrayBuffer);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:10,代码来源:e.java

示例12: getDisplayName

import android.database.CharArrayBuffer; //导入依赖的package包/类
public final void getDisplayName(CharArrayBuffer paramCharArrayBuffer)
{
  if (M("external_player_id"))
  {
    a("default_display_name", paramCharArrayBuffer);
    return;
  }
  this.wx.getDisplayName(paramCharArrayBuffer);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:10,代码来源:d.java

示例13: getDisplayName

import android.database.CharArrayBuffer; //导入依赖的package包/类
public final void getDisplayName(CharArrayBuffer paramCharArrayBuffer)
{
  if (this.wu == null)
  {
    fc.b(this.qa, paramCharArrayBuffer);
    return;
  }
  this.wu.getDisplayName(paramCharArrayBuffer);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:10,代码来源:ParticipantEntity.java

示例14: getFormattedCurrentSteps

import android.database.CharArrayBuffer; //导入依赖的package包/类
public final void getFormattedCurrentSteps(CharArrayBuffer paramCharArrayBuffer)
{
  boolean bool;
  if (getType() == 1)
    bool = true;
  else
    bool = false;
  ds.p(bool);
  a("formatted_current_steps", paramCharArrayBuffer);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:11,代码来源:a.java

示例15: getFormattedTotalSteps

import android.database.CharArrayBuffer; //导入依赖的package包/类
public final void getFormattedTotalSteps(CharArrayBuffer paramCharArrayBuffer)
{
  boolean bool;
  if (getType() == 1)
    bool = true;
  else
    bool = false;
  ds.p(bool);
  a("formatted_total_steps", paramCharArrayBuffer);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:11,代码来源:a.java


注:本文中的android.database.CharArrayBuffer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。