Android Array Adapter with ArrayList and ListView not updating when the arraylist is changed
- 阅读更多 关于 Android Array Adapter with ArrayList and ListView not updating when the arraylist is changed
问题 I have an android app with a screen that comprises of a ListView, which I am using to display a list of devices. These devices are held in an array. I am trying to use the ArrayAdapter to display what is in the array on the screen in a list. It works when I first load the SetupActivity class, however, there is the facility to add a new device in the addDevice() method, which means the array holding the devices is updated. I am using notifyDataSetChanged() which is supposed to update the list