Esempio n. 1
0
        public static StockFragment NewInstance(int companyIndex)
        {
            var stockFrag = new StockFragment {
                Arguments = new Bundle()
            };

            stockFrag.Arguments.PutInt("companyIndex", companyIndex);
            return(stockFrag);
        }
Esempio n. 2
0
        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();
        }