protected UIView DefaultGetViewForHeader(UITableView tableView, nint section) { var groupTypeId = GetSectionType((int)section); var sectionView = tableView.DequeueReusableHeaderFooterView(groupTypeId.ToString()); var view = sectionView.AsView(); var context = new GroupedListSectionContext() { SectionHeaderView = view, Section = (int)section }; view = GetSection(context); _lastSectionView = sectionView; _lastSection = section; return(view); }
public sealed override Android.Views.View GetGroupView(int groupPosition, bool isExpanded, Android.Views.View convertView, ViewGroup parent) { var context = new GroupedListSectionContext() { SectionHeaderView = convertView.AsView(), Section = groupPosition, IsExpanded = isExpanded, Parent = parent.AsView() }; var section = GetSection(context); if (convertView == null) { var mExpandableListView = parent as ExpandableListView; mExpandableListView?.ExpandGroup(groupPosition); } return(section); }
public static int GetSectionTypeFromContext(this INewGroupedListContent content, GroupedListSectionContext context) { return content.GetSectionType(context.Section); }
public abstract View GetSection(GroupedListSectionContext context);