I have a ListView that displays every item in an array called, "Facts_Array". What I would like to do is display the count of the item clicked on. Right now I have this:
lv.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view,int position, long id) {
Toast.makeText(getApplicationContext(), ((TextView) view).getText(),Toast.LENGTH_SHORT).show();
}
When an item is clicked in the listview, it displays it using Toast. What I would like to change is what the toast displays. I would like it to find the number in which the item comes. If I click on the second item in the list, I want it to display number 2. Thanks!