I have an activity with a listview in it. I implemented a custom list adapter based on ArrayAdapter. Some of the items within the list are clickable and some are not. So I implemented the onClickListener within the getView method of the listadapter.
I can refresh the listview just fine by calling the notifyDataSetChanged() method.
What I want to do is refresh the textview within the activity which contains the list whenever an item in the list is clicked. I can’t think of a way to do this. Anybody have any suggestions?
This is what the activity contains:
- TextView (Title)
- TextView (total points) -> I want to update this
- ListView (some items in the list are clickable)
Take the reference of the TextView inside your CustomListAdapter, then trigger the update of the total points textview inside your onClickListener.
pseudo