public void onClick(View v) {
switch (v.getId()) {
int record_position = null;
case R.id.Button01:
// Get all contacts
db.open();
Cursor c = db.getAllContacts();
if (record_position == null){
if (c.moveToFirst()) {
record_position = c.getPosition();
DisplayContact(c);
}
}
else if (c.moveToPosition(record_position)){
c.moveToNext();
record_position = c.getPosition();
DisplayContact(c);
}
else {
if(c.moveToFirst){
record_position = c.getPosition();
DisplayContact(c);
}
}
db.close();
break;
}
}
Why do i get this error? What is the problem? What is going wrong?Why do i get this error? What is the problem? What is going wrong?