public void OnHeaderClick(StickyListHeadersListView listView, View header, int itemPosition, long headerId, bool currentlySticky) { Toast.MakeText(Activity, "header " + headerId, ToastLength.Short).Show(); #if __ANDROID_11__ if ((int) Build.VERSION.SdkInt >= 11) //HC { m_StickyList.SmoothScrollToPositionFromTop(m_Adapter.GetSectionStart(itemPosition) + m_StickyList.HeaderViewsCount, -m_StickyList.PaddingTop); } #endif }
public override View OnCreateView(LayoutInflater p0, ViewGroup p1, Bundle p2) { var v = p0.Inflate(Resource.Layout.fragment_test, p1, false); m_StickyList = v.FindViewById<StickyListHeadersListView>(Resource.Id.list); m_StickyList.OnItemClickListener = this; m_StickyList.OnHeaderListClickListener = this; m_StickyList.AddHeaderView(p0.Inflate(Resource.Layout.list_header, null)); m_StickyList.AddFooterView(p0.Inflate(Resource.Layout.list_footer, null)); m_Adapter = new TestBaseAdapter(Activity); m_StickyList.EmptyView = v.FindViewById(Resource.Id.empty); m_StickyList.Adapter = m_Adapter; return v; }
public StickyListHeadersListViewObserver(StickyListHeadersListView listView) { m_ListView = listView; }
public AdapterHeaderAdapterClickListener(IOnHeaderListClickListener listClickListener, StickyListHeadersListView stickyListHeadersListView) { m_OnHeaderListClickListener = listClickListener; m_StickyListHeadersListView = stickyListHeadersListView; }
public StickyListHeadersListViewWrapper(StickyListHeadersListView listView) { mListView = listView; }
/** * Sets the {@link se.emilsjolander.stickylistheaders.StickyListHeadersListView} that this adapter will be bound to. */ public void setStickyListHeadersListView(StickyListHeadersListView listView) { IListViewWrapper stickyListHeadersListViewWrapper = new StickyListHeadersListViewWrapper(listView); setListViewWrapper(stickyListHeadersListViewWrapper); }