private void GroupsListView_ChildViewAdded(object sender, ViewGroup.ChildViewAddedEventArgs e) { for (int i = 0; i < groups.Count; i++) { for (int j = 0; j < MainActivity.SelectedContact.Groups.Count; j++) { if (MainActivity.SelectedContact.Groups[j].ID == groups[i].ID) { e.Child.Selected = true; e.Child.SetBackgroundColor(Color.Rgb(169, 169, 169)); selectedGroups.Add(groups[i]); groups.Remove(groups[i]); break; } else { e.Child.Selected = false; e.Child.SetBackgroundColor(default(Color)); } } if (e.Child.Selected) { break; } } }
private void ToolbarChildAdded(object sender, ViewGroup.ChildViewAddedEventArgs e) { if (e.Child is Android.Support.V7.Widget.AppCompatTextView tv) { // identify the title text view and center it tv.LayoutParameters = new Android.Support.V7.Widget.Toolbar.LayoutParams(ActionBar.LayoutParams.WrapContent, ActionBar.LayoutParams.WrapContent, (int)GravityFlags.Right); } }
private void OnChildViewAdded(object sender, ViewGroup.ChildViewAddedEventArgs e) { if (!(e.Child is BottomNavigationItemView item)) { return; } item.SetShifting(false); item.SetChecked(item.ItemData.IsChecked); }
private void OnChildViewAdded(object sender, ViewGroup.ChildViewAddedEventArgs args) { //var li = (args.Child as MvxListItemView); var radioButton = args.Child as RadioButton; // radio buttons require an id so that they get un-checked correctly if (radioButton?.Id == NoId) { radioButton.Id = GenerateViewId(); } }
private void HideSpecificControls(object sender, ViewGroup.ChildViewAddedEventArgs e) { var childView = e.Child; foreach (var tag in this.controlsTagsToHide) { var control = childView.FindViewWithTag(tag); if (control != null) { control.Visibility = ViewStates.Invisible; } } }
private void ChartLayout_ChildViewAdded(object sender, ViewGroup.ChildViewAddedEventArgs e) { if (e.Child.Tag.Equals(pieChartTag)) { pieChartAdded = true; } else if (e.Child.Tag.Equals(columnChartTag)) { columnChartAdded = true; } else if (e.Child.Tag.Equals(lineChartTag)) { lineChartAdded = true; } }
private void OnChildViewAdded(object sender, ViewGroup.ChildViewAddedEventArgs e) { if (_readOnlyEntriesPosition == null || _listView == null || e.Child == null) { return; } var position = _listView.GetPositionForView(e.Child); if (position < 0) { return; } if (_readOnlyEntriesPosition.Contains(position)) { e.Child.Enabled = false; e.Child.Clickable = false; e.Child.Focusable = false; } }
private static void ListView_ChildViewAdded(int height, ViewGroup.ChildViewAddedEventArgs e) { e.Child.LayoutParameters.Height = height; }