Пример #1
0
        public void AddTab(TabModel model)
        {
            if (tabs.ContainsKey(model.Name))
            {
                return;
            }
            Visibility = ViewStates.Visible;
            var inflator = LayoutInflater.From(Context);
            
            var tab = inflator.Inflate(Resource.Layout.tab, null) as Tab;
            tab.SetTabModel(model);
            tab.SetOnClickListener(this);
            tab.LayoutParameters = tabParams;

            if (tabs.Count == 0)
            {
                tab.OnSelected(false);
            }
            else
            {
                tab.OnDeselected();
            }

            tabs.Add(model.Name, tab);

            AddView(tab);
        }
Пример #2
0
        public void AddTab(TabModel model)
        {
            if (tabs.ContainsKey(model.Name))
            {
                return;
            }
            Visibility = ViewStates.Visible;
            var inflator = LayoutInflater.From(Context);

            var tab = inflator.Inflate(Resource.Layout.tab, null) as Tab;

            tab.SetTabModel(model);
            tab.SetOnClickListener(this);
            tab.LayoutParameters = tabParams;

            if (tabs.Count == 0)
            {
                tab.OnSelected(false);
            }
            else
            {
                tab.OnDeselected();
            }

            tabs.Add(model.Name, tab);

            AddView(tab);
        }
 public void AddTab(TabModel model)
 {
     tabs.Add(model);
 }
Пример #4
0
 public void AddTab(TabModel model)
 {
     TabHost.AddTab(model);
 }
Пример #5
0
 public void SetTabModel(TabModel model)
 {
     this.model = model;
     tabButton.Text = model.Name;
 }
Пример #6
0
 public void SetTabModel(TabModel model)
 {
     this.model     = model;
     tabButton.Text = model.Name;
 }