I\'m trying display random data from database into two textviews (TextView1 display NAME, TextView2 display PHONENUMBER) when I click on next button, but I don\'t know how c
you will need to set setOnClickListener for button to do some action on Button click and use and Counter variable to show next value on button click as:
List contacts = db.getAllContacts();
TextView name = (TextView) findViewById(R.id.textView1);
Button buttonnext = (Button) findViewById(R.id.next);
buttonnext.setOnClickListener(onclickListener);
int listcounter=0;
private OnClickListener onclickListener = new OnClickListener() {
@Override
public void onClick(final View v) {
if(listcounter