void TabOnTabSelected(object sender, ActionBar.TabEventArgs tabEventArgs) { var tabNo = sender as ActionBar.Tab; var frag = fragments[tabNo.Position]; tabEventArgs.FragmentTransaction.Replace(Resource.Id.frameLayout1, frag); }
void TabOnTabSelected(object sender, ActionBar.TabEventArgs tabEventArgs) { this.tab = sender as ActionBar.Tab; Fragment frag = _fragments[tab.Position]; tabEventArgs.FragmentTransaction.Replace(Resource.Id.frameLayout1, frag); }
void TabOnTabSelected(object sender, ActionBar.TabEventArgs tabEventArgs) { ActionBar.Tab tab = (ActionBar.Tab)sender; Fragment frag = _fragmentsArray[tab.Position]; tabEventArgs.FragmentTransaction.Replace(Resource.Id.frameLayout1, frag); }
private void TabSetting_TabSelected(object sender, ActionBar.TabEventArgs e) { SetContentView(Resource.Layout.Setting); Button buttonStart = FindViewById <Button>(Resource.Id.buttonStart); Button buttonStop = FindViewById <Button>(Resource.Id.buttonStop); CheckBox checkBoxCreateBlocks = FindViewById <CheckBox>(Resource.Id.checkBoxCreateBlocks); CheckBox checkBoxDiscovery = FindViewById <CheckBox>(Resource.Id.checkBoxPeerDiscovery); CheckBox checkBoxLocalIP = FindViewById <CheckBox>(Resource.Id.checkBoxUseLanLocalIP); EditText editTextTrackers = FindViewById <EditText>(Resource.Id.editTextTrackers); buttonStart.Enabled = !(BlockChainService.BlockChain.Started); buttonStart.Click += ButtonStart_Click; buttonStop.Click += ButtonStop_Click; checkBoxCreateBlocks.Click += CheckBoxCreateBlocks_Click; checkBoxDiscovery.Click += CheckBoxDiscovery_Click; checkBoxLocalIP.Click += CheckBoxLocalIP_Click; editTextTrackers.TextChanged += EditTextTrackers_TextChanged; checkBoxCreateBlocks.Checked = VotingsUser.CreateOwnBlocks; checkBoxDiscovery.Checked = VotingsUser.PeerDiscovery; checkBoxLocalIP.Checked = VotingsUser.UseLanLocalIP; editTextTrackers.Text = VotingsUser.Trackers; //обработка вывода лога в консоль TextView textViewConsole = FindViewById <TextView>(Resource.Id.textViewConsole); textViewConsole.Text = ConsoleToTextViewWriter.Text; writer.textView = textViewConsole; }
void TabOnTabSelected(object sender, ActionBar.TabEventArgs tabEventArgs) { activity.ActionBar.Title = Element.Title; activity.ActionBar.SetIcon(Resource.Drawable.menu); activity.ActionBar.SetDisplayHomeAsUpEnabled(false); activity.ActionBar.SetIcon(Resource.Drawable.menu); }
private void TabSelected(object sender, ActionBar.TabEventArgs e) { var tab = sender as ActionBar.Tab; if (tab == null) { return; } var id = (int)tab.Tag; //ViewModel.Init(); switch (id) { case 1: listView.Adapter = profileAdapter; break; case 2: usersAdapter.NotifyDataSetChanged(); listView.Adapter = usersAdapter; break; case 3: rolesAdapter.NotifyDataSetChanged(); listView.Adapter = rolesAdapter; break; } }
private void TabSelected(object sender, ActionBar.TabEventArgs e) { if (this.currentTabIndex != this.ActionBar.SelectedTab.Position) { this.SelectTabAt(this.ActionBar.SelectedTab.Position); } }
private void TabReg_TabSelected(object sender, ActionBar.TabEventArgs e) { SetContentView(Resource.Layout.Register); Button buttonReg = FindViewById <Button>(Resource.Id.buttonReg); buttonReg.Click += ButtonReg_Click; }
private void Tab_TabSelected(object sender, ActionBar.TabEventArgs e) { var tab = (ActionBar.Tab)sender; e.FragmentTransaction.Replace(Resource.Id.MainView_TabFragmentContainer, (Fragment)tab.Tag); // TODO: Check if we should also use .Remove in TabUnselected event? E.g. see http://arvid-g.de/12/android-4-actionbar-with-tabs-example CurrentSubView = (MainViewModel.SubView)tab.Position; }
void TabOnTabSelected(object sender, ActionBar.TabEventArgs args) { ActionBar.Tab tab = (ActionBar.Tab)sender; Log.Debug("[TABS]", "Tab selecionada: " + tab.Text + " | " + tab.Position); Fragment frag = fragments[tab.Position]; args.FragmentTransaction.Replace(Resource.Id.frameLayout1, frag); }
void OnTabSelected(object sender, ActionBar.TabEventArgs e) { var tab = (ActionBar.Tab)sender; if (this._viewPager.CurrentItem != tab.Position) { this._viewPager.CurrentItem = tab.Position; } }
void TabOnTabSelected(object sender, ActionBar.TabEventArgs tabEventArgs) { ActionBar.Tab tab = (ActionBar.Tab)sender; Log.Debug(Tag, "The tab {0} has been selected.", tab.Text); Fragment frag = _fragments[tab.Position]; tabEventArgs.FragmentTransaction.Replace(Resource.Id.frameLayout1, frag); }
//--------------------------------------------------------------------------------------------------------------------------------------------------- //Tab for height plot. private void Tab_TabSelectedHeight(object sender, ActionBar.TabEventArgs e) { var fragment = this.FragmentManager.FindFragmentById(Resource.Id.Connector); if (fragment != null) { e.FragmentTransaction.Remove(fragment); } e.FragmentTransaction.Add(Resource.Id.Connector, new tab_products_GraphHeight()); }
//--------------------------------------------------------------------------------------------------------------------------------------------------- //Tab for alcohol calendar. private void Tab_TabSelectedCalendarAlcohol(object sender, ActionBar.TabEventArgs e) { var fragment = this.FragmentManager.FindFragmentById(Resource.Id.Connector); if (fragment != null) { e.FragmentTransaction.Remove(fragment); } e.FragmentTransaction.Add(Resource.Id.Connector, new TabAlcoholCalendar()); }
//--------------------------------------------------------------------------------------------------------------------------------------------------- //Tab for ProtsFatsCarbs. private void Tab_TabSelectedProtsFatsCarbs(object sender, ActionBar.TabEventArgs e) { var fragment = this.FragmentManager.FindFragmentById(Resource.Id.Connector); if (fragment != null) { e.FragmentTransaction.Remove(fragment); } e.FragmentTransaction.Add(Resource.Id.Connector, new TabMenuProtsFatsCarbs()); }
private void TabLogin_TabSelected(object sender, ActionBar.TabEventArgs e) { SetContentView(Resource.Layout.Login); Button buttonLogin = FindViewById <Button>(Resource.Id.buttonLogin); buttonLogin.Click += ButtonLogin_Click; EditText editTextPublicKey = FindViewById <EditText>(Resource.Id.editTextPublicKeyLogin); editTextPublicKey.Text = VotingsUser.PublicKey; editTextPublicKey.Enabled = false; }
private void OnTabSelected(object sender, ActionBar.TabEventArgs e) { var tabAtual = (ActionBar.Tab)sender; if (tabAtual.Position == 0) { txtValor.Text = "Esta é a TAB UM que foi selecionada"; } else { txtValor.Text = "Esta é a TAB DOIS que foi selecionada"; } }
private void OnTabSelected(object sender, ActionBar.TabEventArgs args) { var CurrentTab = (ActionBar.Tab)sender; if (CurrentTab.Position == 0) { Log.Debug("Info", CurrentTab.Position.ToString()); } else { Log.Debug("Info", CurrentTab.Position.ToString()); } }
private void Tab_TabSelected(object sender, ActionBar.TabEventArgs e) { global::Android.App.ActionBar.Tab myTab = (global::Android.App.ActionBar.Tab)sender; if (myTab == null) { return; } ImageView iv = (ImageView)myTab.CustomView; if (iv != null) { iv.SetColorFilter(selectionColor); } }
private void OnTabSelected(object sender, ActionBar.TabEventArgs e) { var tabAtual = (ActionBar.Tab)sender; if (tabAtual.Position == 0) { txtValor.Text = "Frutas"; items = new string[] { "Abacaxi", "Banana", "Maçã" }; } else { if (tabAtual.Position == 1) { txtValor.Text = "Verduras"; items = new string[] { "Alface", "Brócolis", "Rúcula" }; } }
private void OnTabSelected(object sender, ActionBar.TabEventArgs e) { var tabatual = (ActionBar.Tab)sender; if (tabatual.Position == 0) { //StartActivity(typeof(CirculoActivity)); items = new string[] { "Círculo" }; } if (tabatual.Position == 1) { items = new string[] { "Quadrado", "Retângulo", "Triângulo" }; } ArrayAdapter adaptador = new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleListItem1, items); lv.Adapter = adaptador; lv.ItemClick += OnListItemClick; }
private void OnScheduleTabSelected(object sender, ActionBar.TabEventArgs e) { var viewPager = FindViewById <ViewPager>(Resource.Id.MainViewPager); viewPager.CurrentItem = 2; }
private void Recent_TabSelected(object sender, ActionBar.TabEventArgs e) => a.Array = (from c in Configuration.Contacts join r in Configuration.Recents on c.Address equals r.Address orderby r.Timestamp descending select c).ToArray();
private void All_TabSelected(object sender, ActionBar.TabEventArgs e) => a.Array = (from c in Configuration.Contacts orderby c.Name.ToLower() ascending select c).ToArray();
private void TabStatistics_TabSelected(object sender, ActionBar.TabEventArgs e) { SetContentView(Resource.Layout.Statistics); TextView textViewTransactions = FindViewById <TextView>(Resource.Id.textViewTransactions); TextView textViewBlocks = FindViewById <TextView>(Resource.Id.textViewBlocks); TextView textViewUsers = FindViewById <TextView>(Resource.Id.textViewUsers); TextView textViewVotings = FindViewById <TextView>(Resource.Id.textViewVotings); TextView textViewPeers = FindViewById <TextView>(Resource.Id.textViewPeers); TextView textViewTrackers = FindViewById <TextView>(Resource.Id.textViewTrackers); BlockChainService.BlockChain.NewTransaction += (s, a) => { RunOnUiThread(() => { textViewTransactions.Text = a.Data.ToString(); }); }; BlockChainService.BlockChain.NewBlock += (s, a) => { RunOnUiThread(() => { textViewBlocks.Text = a.Data.ToString(); }); }; BlockChainService.BlockChain.NewUser += (s, a) => { RunOnUiThread(() => { textViewUsers.Text = a.Data.ToString(); }); }; BlockChainService.BlockChain.NewVoting += (s, a) => { RunOnUiThread(() => { textViewVotings.Text = BlockChainService.BlockChain.GetVotings().Count.ToString(); }); }; CommonHelpers.PeersCountChanged += (s, a) => { RunOnUiThread(() => { textViewPeers.Text = a.Data.ToString(); }); }; CommonHelpers.TrackersCountChanged += (s, a) => { RunOnUiThread(() => { textViewTrackers.Text = a.Data.ToString(); }); }; textViewTransactions.Text = BlockChainService.BlockChain.GetTransactionsCount().ToString(); textViewBlocks.Text = BlockChainService.BlockChain.GetBlocksCount().ToString(); textViewUsers.Text = BlockChainService.BlockChain.GetUsersCount().ToString(); textViewVotings.Text = BlockChainService.BlockChain.GetVotings().Count.ToString(); textViewPeers.Text = BlockChainService.BlockChain.PeersCount.ToString(); textViewTrackers.Text = BlockChainService.BlockChain.TrackersCount.ToString(); }
private void Mytab_TabSelected(object sender, ActionBar.TabEventArgs e) { // throw new System.NotImplementedException(); }
private void Mytab_TabReselected(object sender, ActionBar.TabEventArgs e) { e.FragmentTransaction.Add(Resource.Id.frameLayout1, new TabFragment()); // throw new System.NotImplementedException(); }
private void Tab_TabSelected(object sender, ActionBar.TabEventArgs e) { }
private void T1_TabSelected(object sender, ActionBar.TabEventArgs e) { Toast.MakeText(this, "t1", ToastLength.Short).Show(); }
private void TabVoting_TabSelected(object sender, ActionBar.TabEventArgs e) { SetContentView(Resource.Layout.Voting); Button voteButton = FindViewById <Button>(Resource.Id.buttonVote); CheckBox agreeCheckBox = FindViewById <CheckBox>(Resource.Id.checkBoxAgree); voteButton.Enabled = false; agreeCheckBox.Enabled = false; //установка имени TextView textViewHello = FindViewById <TextView>(Resource.Id.textViewHello); string name = BlockChainService.BlockChain.GetMyName(); if (name == null) { textViewHello.Text = Resources.GetString(Resource.String.hello) + ", " + Resources.GetString(Resource.String.user); } else { textViewHello.Text = Resources.GetString(Resource.String.hello) + ", " + name; } BlockChainService.BlockChain.NewTransaction += (s, ee) => { string name2 = BlockChainService.BlockChain.GetMyName(); if (name2 != null) { RunOnUiThread(() => { textViewHello.Text = Resources.GetString(Resource.String.hello) + ", " + name2; }); } }; voteButton.Click += VoteButton_Click; //заполняем голосования Spinner votingsSpiner = FindViewById <Spinner>(Resource.Id.spinnerVoting); var transactions = BlockChainService.BlockChain.GetOpenedVotings(); var list = new List <SpinerItem>(); foreach (var item in transactions) { try { var info = JObject.Parse(item.Info); string line = "№" + item.VotingNumber + " " + info["name"] + " " + Resources.GetString(Resource.String.from) + " " + item.Date0.ToShortDateString(); list.Add(new SpinerItem(line, item)); } catch { } } var arrayAdapter = new ArrayAdapter <SpinerItem>(this, Android.Resource.Layout.SimpleSpinnerDropDownItem, list); votingsSpiner.Adapter = arrayAdapter; votingsSpiner.ItemSelected += VotingsSpiner_ItemSelected; }