Skip to content Skip to sidebar Skip to footer

Passing The Position From Listview To New Activity

how can i pass the value or the position of the selected item in listview to a new activity tha will use that value to retrieve data from database in listview (in the new activity)

Solution 1:

use

Bundleextras= getIntent().getExtras();
  if (extras != null) 
  Stringtemp= extras.getInt("id");

instead of extras.getString("id") because you are passing Integer from ListView click

Post a Comment for "Passing The Position From Listview To New Activity"