private void ReloadData()
        {
            var exerciseDescription = PercentageCalculator.ExerciseDescription(calculator.Exercise);

            ExerciseButton.SetTitle(exerciseDescription, UIControlState.Normal);
            ExerciseButton.SetTitle(exerciseDescription, UIControlState.Selected);
            TableView.ReloadData();
        }
示例#2
0
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            var cell  = tableView.DequeueReusableCell("PercentageExerciseCell", indexPath);
            var value = exercises [indexPath.Row];

            cell.TextLabel.Text = PercentageCalculator.ExerciseDescription(value);
            if (value == exercise)
            {
                cell.Accessory = UITableViewCellAccessory.Checkmark;
            }
            else
            {
                cell.Accessory = UITableViewCellAccessory.None;
            }
            return(cell);
        }
示例#3
0
        public override View GetView(int position, View convertView, ViewGroup parent)
        {
            var view = convertView;

            if (null == view)
            {
                view = inflater.Inflate(Resource.Layout.spinner_item, null);
            }
            TextView textView = view as TextView;

            if (null != textView)
            {
                textView.Text = PercentageCalculator.ExerciseDescription(data [position]);
            }
            return(view);
        }