Exemple #1
0
        protected override void HandleItemClick(AdapterView parent, AView nview, int position, long id)
        {
            ITableModel model = Controller.Model;

            if (position < 0 || position >= CellCache.Length)
            {
                return;
            }

            if (IsHeaderCache[position])
            {
                return;
            }

            model.RowSelected(CellCache[position]);
        }
Exemple #2
0
        protected override void HandleItemClick(AdapterView parent, AView nview, int position, long id)
        {
            ITableModel model = Controller.Model;

            int sectionCount = model.GetSectionCount();

            for (var sectionIndex = 0; sectionIndex < sectionCount; sectionIndex++)
            {
                if (position == 0)
                {
                    return;
                }

                int size = model.GetRowCount(sectionIndex) + 1;

                if (position < size)
                {
                    model.RowSelected(sectionIndex, position - 1);
                    return;
                }

                position -= size;
            }
        }