Search code examples
androidlistviewbaseadapternotifydatasetchanged

calling notifyDataSetChanged() makes multiple time execution of getView()


I am using customized BaseAdapter to show the listdata, whenever there is change in listitem I am calling notifyDataSetChanged() but it makes multiple calls to getView() method, I have given android:layout_height="fill_parent" to the ListView. It will solve my problem if it gets invoked only single time for every notifyDataSetChanged() call.


Solution

  • It is my mistake. I did not update ListView to android:layout_height="fill_parent" in different layout files like layout-hdpi etc