Example #1
0
        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;
        }
Example #2
0
        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;
            }
        }
Example #3
0
        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;
        }
Example #4
0
        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();
            }
        }
Example #5
0
        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();
        }
Example #6
0
        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;
                }
            }
        }