Example #1
0
        public override View GetView(int position, View convertView, ViewGroup parent)
        {
            ViewHolder <TItem> viewHolder = null;

            if (convertView == null)
            {
                convertView     = LayoutInflater.FromContext(Context).Inflate(LayoutId, null);
                viewHolder      = (ViewHolder <TItem>)Activator.CreateInstance(typeof(ViewHolder <TItem>), Items[position], Bindings);
                convertView.Tag = viewHolder;
            }
            else
            {
                viewHolder      = (ViewHolder <TItem>)convertView.Tag;
                viewHolder.Item = Items[position];
            }

            viewHolder.Bind(convertView);

            return(convertView);
        }