protected override void UpdateCaptionDisplay(View cell) { if (cell == null) { return; } View _rawToggleButton; TextView _caption; TextView _subCaption; DroidResources.DecodeBooleanElementLayout(Context, cell, out _caption, out _subCaption, out _rawToggleButton); _caption.Text = Caption; }
protected override void UpdateCaptionDisplay(View cell) { if (cell == null) { return; } TextView _caption; TextView _subCaption; View _rawCheckboxView; DroidResources.DecodeBooleanElementLayout(Context, cell, out _caption, out _subCaption, out _rawCheckboxView); _caption.Text = Caption; if (_subCaption != null) { _subCaption.Text = SubCaption; } }
protected override void UpdateDetailDisplay(View cell) { if (cell == null) { return; } TextView _caption; TextView _subCaption; View _rawCheckboxView; DroidResources.DecodeBooleanElementLayout(Context, cell, out _caption, out _subCaption, out _rawCheckboxView); var _checkbox = (CheckBox)_rawCheckboxView; _checkbox.SetOnCheckedChangeListener(null); _checkbox.Checked = Value; _checkbox.SetOnCheckedChangeListener(this); _checkbox.Clickable = !ReadOnly; }
public override void Selected() { if (CurrentAttachedCell == null) { // how did this happen?! return; } View _rawToggleButton; TextView _caption; TextView _subCaption; DroidResources.DecodeBooleanElementLayout(Context, CurrentAttachedCell, out _caption, out _subCaption, out _rawToggleButton); ToggleButton _toggleButton = (ToggleButton)_rawToggleButton; if (_toggleButton != null) { _toggleButton.Toggle(); } }
public override void Selected() { if (ReadOnly) { return; } if (CurrentAttachedCell == null) { // how on earth did this happen! return; } TextView _caption; TextView _subCaption; View _rawCheckboxView; DroidResources.DecodeBooleanElementLayout(Context, CurrentAttachedCell, out _caption, out _subCaption, out _rawCheckboxView); var _checkbox = (CheckBox)_rawCheckboxView; _checkbox.Toggle(); }
protected override void UpdateDetailDisplay(View cell) { if (cell == null) { return; } View _rawToggleButton; TextView _caption; TextView _subCaption; DroidResources.DecodeBooleanElementLayout(Context, cell, out _caption, out _subCaption, out _rawToggleButton); ToggleButton _toggleButton = (ToggleButton)_rawToggleButton; _toggleButton.SetOnCheckedChangeListener(null); _toggleButton.Checked = Value; _toggleButton.SetOnCheckedChangeListener(this); if (TextOff != null) { _toggleButton.TextOff = TextOff; if (!Value) { _toggleButton.Text = TextOff; } } if (TextOn != null) { _toggleButton.TextOn = TextOn; if (Value) { _toggleButton.Text = TextOn; } } }