You can create a view as the header of your list and, when you recognize the scroll, hide / show this view.
final HeaderView header = new HeaderView(getActivity(), json);
mListView.addHeaderView(header);
setOnScrollListener(new OnScrollListener(){
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
// TODO Auto-generated method stub
}
public void onScrollStateChanged(AbsListView view, int scrollState) {
// TODO Auto-generated method stub
if(scrollState == 0) {
Log.i("a", "scrolling stopped...");
if (view.getId() == mListView.getId()) {
final int currentFirstVisibleItem = mListView.getFirstVisiblePosition();
if (currentFirstVisibleItem > mLastFirstVisibleItem) {
header.setVisibility(View.VISIBLE);
} else if (currentFirstVisibleItem < mLastFirstVisibleItem) {
header.setVisibility(View.GONE)
}
mLastFirstVisibleItem = currentFirstVisibleItem;
}
}
}
});