android.widget.SimpleCursorAdapter.convertToString()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中android.widget.SimpleCursorAdapter.convertToString()方法的一些代码示例,展示了SimpleCursorAdapter.convertToString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SimpleCursorAdapter.convertToString()方法的具体详情如下:
包路径:android.widget.SimpleCursorAdapter
类名称:SimpleCursorAdapter
方法名:convertToString

SimpleCursorAdapter.convertToString介绍

暂无

代码示例

代码示例来源:origin: org.robolectric/shadows-core

@Implementation
public CharSequence convertToString(Cursor cursor) {
 if (mCursorToStringConverter != null) {
  return mCursorToStringConverter.convertToString(cursor);
 } else if (mStringConversionColumn > -1) {
  return cursor.getString(mStringConversionColumn);
 }
 return realSimpleCursorAdapter.convertToString(cursor);
}

代码示例来源:origin: org.robolectric/shadows-core-v23

@Implementation
public CharSequence convertToString(Cursor cursor) {
 if (mCursorToStringConverter != null) {
  return mCursorToStringConverter.convertToString(cursor);
 } else if (mStringConversionColumn > -1) {
  return cursor.getString(mStringConversionColumn);
 }
 return realSimpleCursorAdapter.convertToString(cursor);
}

代码示例来源:origin: com.github.japgolly.android.test/robolectric

/**
 * Returns a CharSequence representation of the specified Cursor as defined
 * by the current CursorToStringConverter. If no CursorToStringConverter
 * has been set, the String conversion column is used instead. If the
 * conversion column is -1, the returned String is empty if the cursor
 * is null or Cursor.toString().
 *
 * @param cursor the Cursor to convert to a CharSequence
 *
 * @return a non-null CharSequence representing the cursor
 */
@Implementation
public CharSequence convertToString(Cursor cursor) {
  if (mCursorToStringConverter != null) {
    return mCursorToStringConverter.convertToString(cursor);
  } else if (mStringConversionColumn > -1) {
    return cursor.getString(mStringConversionColumn);
  }
  return realSimpleCursorAdapter.convertToString(cursor);
}

相关文章