void UpdateIsEnabled(SwitchCellView cell, SwitchCell switchCell) { cell.Enabled = switchCell.IsEnabled; var aSwitch = cell.AccessoryView as ASwitch; if (aSwitch != null) aSwitch.Enabled = switchCell.IsEnabled; }
protected override AView GetCellCore(Cell item, AView convertView, ViewGroup parent, Context context) { var cell = (SwitchCell)Cell; if ((_view = convertView as SwitchCellView) == null) _view = new SwitchCellView(context, item); _view.Cell = cell; UpdateText(); UpdateChecked(); UpdateHeight(); UpdateIsEnabled(_view, cell); return _view; }