[Solved] Updating ArrayList with onlick not working
[ad_1] You’ve two arrayList one local and another one global. onClick() method you’re adding your item in global arrayList having reference name fruits but your ListView using local arrayList also having same name fruits, so don’t create local list inside onCreate() method. Also after adding new fruit call notifyDataSetChanged() on your adapter. ArrayList<String> fruits; ListAdapter … Read more