I have a menu which when fired send an SMS and from the BroadCastReciever, the data is send to the model classes where the data is parsed and is set into the model attributes. The model class has a method which returns an ArrayList which is set to BaseAdapter?
My Problem is i need to fired the menu firstly, then send sms and does as above. The listview is not updated but if i click the menu again then only listview is visible.
What Am i doing wrong so that i need to fire my menu twice and is only listview being updated?
Any suggestions?
This solution worked for me:
yourAdapterObject= new MyAdapter(getApplicationContext(), arrayList); listView.setAdapter(yourAdapterObject); listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); ((MyAdapter)yourAdapterObject).notifyDataSetChanged();