0

I want to open the new activity from the listview for the contacts but not new activity for every value on the Array because it's a contacts

public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
    Intent x = new Intent(this, Main2Activity.class);
    x.putExtra("selected", i);
    startActivity(x);
}
Shivam Kumar
  • 1,892
  • 2
  • 21
  • 33
Ahmed
  • 1
  • 1

0 Answers0