Timothy Frisch
Timothy Frisch

Reputation: 2809

Dynamically adding to a listview from an object constructed via input from a dialog

So; I have a object that takes in several paramaters:

digitalControlObject(int, int, bool bool);

I get these objects constructed when a user hits "add" and a dialog appears with options to fill in each of those input paramaters.

However; Is there a way to then take that new object and add it dynamically to a listview on the same fragment?

Thanks,

Upvotes: 0

Views: 70

Answers (1)

super-qua
super-qua

Reputation: 3188

You have to add it to the array of the listViewAdapter and then call listViewAdapter.notifyDatasetChanged()

Upvotes: 1

Related Questions