I have a ListView which is getting populated from service response. When service is called i am showing a progressbar by adding footerview by inflating progressbar view and hiding it once listview is populated.
Note: I am adding footerview before setting adapter. Then i am adding footerview at each service call.
problem: when service returns non empty response everything is working fine(footerview is shown and hided after listview is populated)
when service response is empty i.e. listview is empty in next method calls to addFooterView() not working(not showing footerview).
Following is sample code
addFooterView(loadingView, null, false);
m_List.addAll(listItems);
m_adapter.notifyDataSetChanged();
removeFooterView(loadingView);
Note: If each time list size is greater than zero i am not facing problem.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…