/// <summary> /// ExpandableListAdapter constructor. Set up a long click listener and the group expander helper class /// </summary> /// <param name="context"></param> /// <param name="view"></param> /// <param name="provider"></param> public ExpandableListAdapter(Context context, ExpandableListView view, IGroupContentsProvider <T> provider, ExpandableListAdapterModel model, IAdapterEventHandler stateChange) { // Save the parameters adapterModel = model; contentsProvider = provider; parentView = view; stateChangeReporter = stateChange; // Save the inflator to use when creating the item views inflator = LayoutInflater.FromContext(context); // Set up listeners for group and child selection and item long click parentView.SetOnGroupClickListener(this); parentView.SetOnChildClickListener(this); parentView.OnItemLongClickListener = this; parentView.SetOnScrollListener(this); }