protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.StatisticsView); ActionBar.Title = GetString(Resource.String.ApplicationTitle); ActionBar.SetHomeButtonEnabled(false); ActionBar.SetDisplayHomeAsUpEnabled(false); ActionBar.Show(); _viewPager = FindViewById <ViewPager>(Resource.Id.page_stats_pager); _pageIndicator = FindViewById <TabPageIndicator>(Resource.Id.page_stats_indicator); _layoutBase = FindViewById <LinearLayout>(Resource.Id.layout_statistics); var fragments = new List <FragmentTabsAdapter.FragmentInfo> { new FragmentTabsAdapter.FragmentInfo { FragmentType = typeof(StatisticsHashrateFragment), Title = GetString(Resource.String.PageStatsCurrentHashrateScrypt), ViewModel = this.ViewModel }, new FragmentTabsAdapter.FragmentInfo { FragmentType = typeof(StatisticsSha256HashrateFragment), Title = GetString(Resource.String.PageStatsCurrentHashrateSha256), ViewModel = this.ViewModel }, new FragmentTabsAdapter.FragmentInfo { FragmentType = typeof(StatisticsStatisticsFragment), Title = GetString(Resource.String.PageStatsStats), ViewModel = this.ViewModel }, new FragmentTabsAdapter.FragmentInfo { FragmentType = typeof(StatisticsShiftsFragment), Title = GetString(Resource.String.PageStatsShifts), ViewModel = this.ViewModel } }; if (_viewPager != null && _pageIndicator != null) { _tabAdapter = new FragmentTabsAdapter(this, SupportFragmentManager, fragments); _viewPager.Adapter = _tabAdapter; _viewPager.OffscreenPageLimit = 4; _pageIndicator.SetViewPager(_viewPager); _pageIndicator.CurrentItem = 0; } //else if (_layoutBase != null) //{ // _layoutBase.AddView(LayoutInflater.Inflate(Resource.Layout.GettingStartedAutomaticFragment, null)); // _layoutBase.AddView(LayoutInflater.Inflate(Resource.Layout.GettingStartedManualFragment, null)); //} }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.DonationView); ActionBar.Title = GetString(Resource.String.PageDonate); ActionBar.SetHomeButtonEnabled(true); ActionBar.SetDisplayHomeAsUpEnabled(true); // < icon erbij ActionBar.Show(); _viewPager = FindViewById <ViewPager>(Resource.Id.page_donate_pager); _pageIndicator = FindViewById <TabPageIndicator>(Resource.Id.page_donate_indicator); _layoutBase = FindViewById <LinearLayout>(Resource.Id.layout_donation); var fragments = new List <FragmentTabsAdapter.FragmentInfo> { new FragmentTabsAdapter.FragmentInfo { FragmentType = typeof(DonateBlackcoinFragment), Title = GetString(Resource.String.DonateTabBlackcoin), ViewModel = this.ViewModel }, new FragmentTabsAdapter.FragmentInfo { FragmentType = typeof(DonateBitcoinFragment), Title = GetString(Resource.String.DonateTabBitcoin), ViewModel = this.ViewModel } }; if (_viewPager != null && _pageIndicator != null) { _tabAdapter = new FragmentTabsAdapter(this, SupportFragmentManager, fragments); _viewPager.Adapter = _tabAdapter; _viewPager.OffscreenPageLimit = 4; _pageIndicator.SetViewPager(_viewPager); _pageIndicator.CurrentItem = 0; } else if (_layoutBase != null) { _layoutBase.AddView(LayoutInflater.Inflate(Resource.Layout.GettingStartedAutomaticFragment, null)); _layoutBase.AddView(LayoutInflater.Inflate(Resource.Layout.GettingStartedManualFragment, null)); } }