//这不起作用。它显示第一条记录并在此之后停止。我想要一个循环,即使在最后一个记录后仍然保持运行。我收到了你点光标开始形式位置0
//代码android.database.CursorIndexOutOfBoundsException:请求索引1,大小为1
cur=db.getData(position);
switch(v.getId())
{
case R.id.next :
{
if (cur != null && cur.getCount()> 0 && position < cur.getCount() && position != cur.getCount()){
cur.moveToPosition(position);
textView1.setText(""+cur.getString(1));// Display Columns
position++;
cur.moveToNext();
}
}
//我想一个循环来显示记录编号
为下一个按钮 如:
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
后退按钮 例如:
5 4 3 2 1 5 4 3 2 1
随机按钮 如:
3 4 5 1
5 1 2 3
4 5 1 2
我想要通过一个使用光标的位置来获取记录之一。我不想用。 – user2438323
这个例外只是第一次出现?记住索引从0开始 – Tobiel