void AddTabTypeBadges(IEnumerable <Tuple <TabType, Bitmap> > badges, LayoutInflater inflater) { foreach (var b in badges) { var type = b.Item1; var bmp = b.Item2; var layout = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent); var badge = new CategoryBadge(inflater.Context) { ItemName = type.Name, IconDrawable = bmp }; categoryPlaceholder.AddView(badge, categoryPlaceholder.ChildCount - 1, layout); BadgeInstances[type.Name] = badge; } }
void AddTabTypeBadges(IEnumerable<Tuple<TabType, Bitmap>> badges, LayoutInflater inflater) { foreach (var b in badges) { var type = b.Item1; var bmp = b.Item2; var layout = new ViewGroup.LayoutParams (ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent); var badge = new CategoryBadge (inflater.Context) { ItemName = type.Name, IconDrawable = bmp }; categoryPlaceholder.AddView (badge, categoryPlaceholder.ChildCount - 1, layout); BadgeInstances[type.Name] = badge; } }