I\'ve created an android application with a ListView. I\'ve added both a header and footer to the list. But when adding a divider/separator it also creates an empty space betwee
I tried a solution by 幻影浪子 that works (based on android-pulltorefresh):
View Layout (header.xml):
Inflating View:
m_headerView = inflater.inflate(R.layout.header, this, false);
Displaying View:
m_headerView.setPadding(0, 0, 0, 0);
m_headerView.setVisibility(View.VISIBLE);
Hiding View:
m_headerView.setPadding(0, -1000, 0, 0);
m_headerView.setVisibility(View.GONE);
It worked perfectly in our project. I hope it is helpful.