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