示例#1
0
        private View GetCell(int position, IListItem cVm, View convertView)
        {
            View cardCell = null;

            allViews.Remove(convertView);

            switch (cVm.ListItemType)
            {
            case ListItemType.Default:
                cardCell = AdapterHelpers.ProcessSocialCard(position, cVm as BaseContentCardViewModel, convertView, LayoutInflater);
                break;

            case ListItemType.Header:
                CleanupCard(convertView);
                cardCell = AdapterHelpers.ProcessHeaderCard(position, cVm, convertView);
                break;

            case ListItemType.MenuItem:
            default:
                CleanupCard(convertView);
                break;
            }
            if (cardCell == null)
            {
                cardCell = LayoutInflater.Inflate(Resource.Layout.DefaultCell, null, false);
            }

            allViews.Add(cardCell);
            return(cardCell);
        }
示例#2
0
            private View GetCell(int position, T vm, View convertView)
            {
                switch (vm.ListItemType)
                {
                case ListItemType.Default:
                    return(AdapterHelpers.ProcessSocialCard(position, vm as BaseContentCardViewModel, convertView, _inflater));
                }
                var cell = _inflater.Inflate(Resource.Layout.DefaultCell, _listView, false);

                return(cell);
            }