public MvxListViewWithHeader (Context context, IAttributeSet attrs) : base (context, attrs, null)
		{
            var headerId = MvxAttributeHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance.ListViewStylableGroupId,
                AndroidBindingResource.Instance.MvxListViewWithHeader_HeaderLayout);
            var footerId = MvxAttributeHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance.ListViewStylableGroupId,
                AndroidBindingResource.Instance.MvxListViewWithHeader_FooterLayout);
            
            var headers = GetFixedViewInfos(headerId);
            var footers = GetFixedViewInfos(footerId);

            var adapter = new MvxAdapter(context);
            adapter.ItemTemplateId = MvxAttributeHelpers.ReadListItemTemplateId(context, attrs);

            var headerAdapter = new HeaderMvxAdapter(headers, footers, adapter);
            Adapter = headerAdapter;
		}
Exemple #2
0
        public MvxListViewWithHeader(Context context, IAttributeSet attrs) : base(context, attrs, null)
        {
            var headerId = MvxAttributeHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance.ListViewStylableGroupId,
                                                                  AndroidBindingResource.Instance.MvxListViewWithHeader_HeaderLayout);
            var footerId = MvxAttributeHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance.ListViewStylableGroupId,
                                                                  AndroidBindingResource.Instance.MvxListViewWithHeader_FooterLayout);

            var headers = GetFixedViewInfos(headerId);
            var footers = GetFixedViewInfos(footerId);

            var adapter = new MvxAdapter(context);

            adapter.ItemTemplateId = MvxAttributeHelpers.ReadListItemTemplateId(context, attrs);

            var headerAdapter = new HeaderMvxAdapter(headers, footers, adapter);

            Adapter = headerAdapter;
        }