So im creating a texting UI for android. The way its handling message threads is that when i hit send it sends the message, creates a new message thread and then adds this message to the corresponing instance of my conversation view.
ConverseView is an activity that only has an onCreate(Bundle) method. This method creates an adapter and populates the adapter with values from a ArrayList. Array list gets a message added to it when the user hits send. However these do not show up in the views.
I believe that the problem is, the activity is being created then im adding a message, and the ListView is not updated. How can i fix this.
Use a
ArrayAdapter adapter;backed by anArrayList. To update the data in the list after modifying your ArrayList just calladapter.notifyDataSetChanged().