This is the code for the answer above, it worked in my case:
I needed to install footerView (this is a loadView on the paginatedView list) in my View list before setting up the adapter, and then uninstall it. First, I initialized my loadView from the layout file in the OnCreate method:
LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); loadingView = layoutInflater.inflate(R.layout.loading_view, null);
Then I used this workaround in the same method:
this.setIsLoading(true); listView.setAdapter(adapter); this.setIsLoading(false);
Where
private void setIsLoading(boolean isLoading) { this.isLoading = isLoading; if (isLoading) { listView.addFooterView(loadingView); } else { listView.removeFooterView(loadingView); } }
wzbozon
source share