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

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

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

SimpleCursorAdapter.getItem介绍

暂无

代码示例

代码示例来源:origin: commonsguy/cw-omnibus

@Override
public void onListItemClick(ListView l, View v, int position, long id) {
 SimpleCursorAdapter adapter=(SimpleCursorAdapter)getListAdapter();
 Cursor row=(Cursor)adapter.getItem(position);
 int link=row.getColumnIndex(DatabaseHelper.LINK);
 ((Contract)getActivity()).onQuestionClicked(row.getString(link));
}

代码示例来源:origin: AEFeinstein/mtg-familiar

/**
 * Get the data item associated with the specified position in the data set.
 * If there is an exception, safely abandon the cursor
 *
 * @param position Position of the item whose data we want within the adapter's data set.
 * @return The data at the position, or null
 */
@Override
public Object getItem(int position) {
  try {
    return super.getItem(position);
  } catch (Exception e) {
    this.swapCursor(null);
    return null;
  }
}

相关文章