Beispiel #1
0
        internal void UpdateItems()
        {
            _bar.RemoveAllViews();

            if (SecondaryItems != null)
            {
                foreach (var control in SecondaryItems.Select(item => DroidFactory.GetNativeObject <Android.Views.View>(item, "item")).Where(item => item != null))
                {
                    _bar.AddView(control);
                }
            }

            if (PrimaryItems == null || !PrimaryItems.Any())
            {
                return;
            }
            {
                _bar.AddView(new Android.Views.View(Context), new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MatchParent, 1));
                foreach (var control in PrimaryItems.Select(item => DroidFactory.GetNativeObject <Android.Views.View>(item, "item")).Where(item => item != null))
                {
                    _bar.AddView(control);
                }
            }
        }