public static NewsFragment NewInstance(int companyIndex) { var newsFrag = new NewsFragment { Arguments = new Bundle() }; newsFrag.Arguments.PutInt("companyIndex", companyIndex); return(newsFrag); }
private void DisplayInformation(int companyIndex) { ListView.SetItemChecked(companyIndex, true); var stock = FragmentManager.FindFragmentById(Resource.Id.stockChart); var news = FragmentManager.FindFragmentById(Resource.Id.news); stock = StockFragment.NewInstance(companyIndex); news = NewsFragment.NewInstance(companyIndex); var ft = FragmentManager.BeginTransaction(); var ft1 = FragmentManager.BeginTransaction(); ft.Replace(Resource.Id.stockChart, stock); ft1.Replace(Resource.Id.news, news); ft.SetTransition(FragmentTransit.FragmentFade); ft1.SetTransition(FragmentTransit.FragmentFade); ft.Commit(); ft1.Commit(); }