Exemplo n.º 1
0
        private void OnChildViewAdded(object sender, Android.Views.ViewGroup.ChildViewAddedEventArgs args)
        {
            var li          = (args.Child as MvxListItemView);
            var radioButton = li?.GetChildAt(0) as AppCompatRadioButton;

            if (radioButton != null)
            {
                // radio buttons require an id so that they get un-checked correctly
                if (radioButton.Id == Android.Views.View.NoId)
                {
                    radioButton.Id = GenerateViewId();
                }
                radioButton.CheckedChange += this.OnRadioButtonCheckedChange;
            }
        }
Exemplo n.º 2
0
        void OnChildViewAdded(object sender, Android.Views.ViewGroup.ChildViewAddedEventArgs args)
        {
            var li = (args.Child as MvxListItemView);

            if (li != null)
            {
                var radioButton = (li.GetChildAt(0) as RadioButton);
                if (radioButton != null)
                {
                    // radio buttons require an id so that they get un-checked correctly
                    if (radioButton.Id == Android.Views.View.NoId)
                    {
                        _generatedId += 1;
                        int rid = _generatedId;
                        radioButton.Id = rid;
                    }
                    radioButton.CheckedChange += OnRadioButtonCheckedChange;
                }
            }
        }