I have a ListView. When an item on the ListView is tapped, it loads a SubView. I want to assign an ID to each row of the ListView, so I can pass that ID along to the SubView
Hi Chris you already have the position id in your listView, implement the onListItemClick() function.
protected void onListItemClick(ListView l, View v, final int position, long id) {
super.onListItemClick(l, v, position, id);
Toast.makeText(this, "my id to pass along the subview is " + position,Toast.LENGTH_LONG).show();
}
if you want assing your own id use setTag()
v.setTag("myownID"+position);