Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
 public static int GetSectionTypeFromContext(this INewGroupedListContent content, GroupedListSectionContext context)
 {
     return content.GetSectionType(context.Section);
 }
Example #4
0
 public abstract View GetSection(GroupedListSectionContext context);