package com.snalopainen.android_listview_filter;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ListView;
/*
 * @author: snalopainen
 * @email: snajdan0525@gmail.com
 * @github: https://github.com/snalopainen
 * 
 * 
 * a ListView hold a header pinned view at the top of the ListView.
 * 
 */
public class PinnedHeaderListView extends ListView {
	
	public PinnedHeaderListView(Context context) {
		super(context);
	}

	public PinnedHeaderListView(Context context, AttributeSet attrs) {
		super(context, attrs);
		// TODO Auto-generated constructor stub
	}

	public PinnedHeaderListView(Context context, AttributeSet attrs,
			int defStyle) {
		super(context, attrs, defStyle);
		// TODO Auto-generated constructor stub
	}

}

@@ -128,24 +128,178 @@
 oid.
-widget.ListView;
+util.MonthDisplayHelper;%0Aimport android.view.View;%0Aimport android.widget.AbsListView;%0Aimport android.widget.ListView;%0Aimport android.widget.AbsListView.OnScrollListener;%0A
 %0A/*%0A
@@ -533,19 +533,179 @@
 istView 
-%7B%0A%09
+implements OnScrollListener %7B%0A%09private Context mContext;%0A%09private View mCurrentPinnedHeaderView;// pinned header view%0A%09private OnScrollListener mOnScrollListener;%0A
 %0A%09public
@@ -763,16 +763,43 @@
 ntext);%0A
+%09%09this.mContext = context;%0A
 %09%7D%0A%0A%09pub
@@ -893,47 +893,32 @@
 ;%0A%09%09
-// TODO Auto-generated constructor stub
+this.mContext = context;
 %0A%09%7D%0A
@@ -1044,47 +1044,508 @@
 ;%0A%09%09
-// TODO Auto-generated constructor stub
+this.mContext = context;%0A%09%7D%0A%0A%09@Override%0A%09public void onScrollStateChanged(AbsListView view, int scrollState) %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09if (mOnScrollListener != null)%0A%09%09%09mOnScrollListener.onScrollStateChanged(view, scrollState);%0A%09%7D%0A%0A%09@Override%0A%09public void onScroll(AbsListView view, int firstVisibleItem,%0A%09%09%09int visibleItemCount, int totalItemCount) %7B%0A%09%09if (mOnScrollListener != null) %7B%0A%09%09%09mOnScrollListener.onScroll(view, firstVisibleItem,%0A%09%09%09%09%09visibleItemCount, totalItemCount);%0A%09%09%7D%0A
 %0A%09%7D%0A

add PinnedHeaderListView