8 namespace MonoDroid.Dialog
17 bool emit = _val != value;
19 if(_checkbox != null && _checkbox.Checked != _val)
20 _checkbox.Checked = _val;
21 else if (emit && ValueChanged != null)
27 public string SubCaption
38 private string subCap;
48 private CheckBox _checkbox;
49 private TextView _caption;
50 private TextView _subCaption;
55 : base(caption, (int)
DroidResources.ElementLayout.dialog_boolfieldright)
61 : base(caption, (int)
DroidResources.ElementLayout.dialog_boolfieldright)
66 public CheckboxElement(
string caption,
bool value,
string subCaption,
string group)
67 : base(caption, (int)
DroidResources.ElementLayout.dialog_boolfieldsubright)
71 SubCaption = subCaption;
75 : base(caption, (int)
DroidResources.ElementLayout.dialog_boolfieldright)
82 : base(caption, layoutId)
88 public override View
GetView(Context context, View convertView, ViewGroup parent)
91 View view = DroidResources.LoadBooleanElementLayout(context, convertView, parent, LayoutId, out _caption, out _subCaption, out checkboxView);
94 _caption.Text = Caption;
96 _checkbox = checkboxView as CheckBox;
97 _checkbox.SetOnCheckedChangeListener(
this);
98 _checkbox.Checked = Value;
99 _checkbox.Clickable = !ReadOnly;
101 if (_subCaption != null)
102 _subCaption.Text = SubCaption;
109 this.Value = isChecked;
CheckboxElement(string caption, bool value)
void OnCheckedChanged(CompoundButton buttonView, bool isChecked)
override View GetView(Context context, View convertView, ViewGroup parent)
Overriden my most derived classes, creates a view that creates a View with the contents for display ...
CheckboxElement(string caption, bool value, string group, int layoutId)
CheckboxElement(string caption)
Used by root elements to fetch information when they need to render a summary (Checkbox count or sele...
CheckboxElement(string caption, bool value, string group)
EventHandler ValueChanged
CheckboxElement(string caption, bool value, string subCaption, string group)