I want to know when my listview has no adapter set on it. I mean, is there a way to know when I have called setListAdapter(mAdapter); without a condition on my code?
I want to add a header to my listview, but just the first time as:
if(getListView().getAdapter() != null){
WWDisplayUtils.addHeaderButton(mTaxis, mAirport, AirportDetailsTaxi.this);
setListAdapter(mTaxiA);
}
else
mTaxiA.notifyDataSetChanged();
But is not doing what I want.
Shouldn’t
be
If you’ve already set a header or footer view, getAdapter() will return a WrapperListAdapter instead of the one you set with setListAdapter()