The only reasons getView is not called are:
getCountreturns 0.- you forget to call
setAdapteron theListView. - If the
ListView‘s visibility (or its container’s visibility) isGONE. Thanks to @TaynãBonaldo for the valuable input. ListViewis not attached to any viewport layout. That is,mListView = new ListView(...)is used withoutmyLayout.addView(mListView).
In the onPostExcute, after you create a new instance of CarListAdapter I will suggest you to update the new instance to your ListView. Indeed you need to call again
mList.setAdapter(adapter);
Edit: setAdapter should be always called on the ui thread, to avoid unexpected behaviours
Edit2:
The same applies to RecyclerView. Make sure that
getItemCountis returning a value grater than0(usually the dataset size)- both
setLayoutManagerandsetAdapterhave to be called on theUI Thread - The visibility of the widget has to be set to
VISIBLE