Im guessing my buttons are right, but when clicked they add integers on the compiler and subtract integers using the next and previous buttons. i want them to scroll through the contacts on the file i have connected?
public void nextContact()
{
if(index < details.size() - 1)
{
index++;
System.out.println(index);
txtname.setText(name.get(index));
txtnum.setText(phone.get(index));
txtmob.setText(mobile.get(index));
txtadd1.setText(address.get(index));
}
importContacts();
}
public void prevContact()
{
if (index > 0)
{
index--;
System.out.println(index);
txtname.setText(name.get(index));
txtnum.setText(phone.get(index));
txtmob.setText(mobile.get(index));
txtadd1.setText(address.get(index));
}
importContacts();
}