protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); if ((int)Build.VERSION.SdkInt >= 21) { Window.SetStatusBarColor(new Color(ContextCompat.GetColor(this, Resource.Color.primary_dark))); Window.DecorView.SystemUiVisibility = StatusBarVisibility.Visible; } adapter = new TabAdapter(this, SupportFragmentManager); pager = FindViewById <ViewPager>(Resource.Id.pager); pager.Adapter = adapter; pager.OffscreenPageLimit = 3; SupportActionBar.Title = "Getting Started (1/5)"; pager.PageSelected += (sender, e) => { SupportActionBar.Title = $"Getting Started ({e.Position + 1}/5)"; }; SupportActionBar?.SetDisplayHomeAsUpEnabled(false); SupportActionBar?.SetDisplayShowHomeEnabled(false); // Create your application here }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); if ((int) Build.VERSION.SdkInt >= 21) { Window.SetStatusBarColor(new Color(ContextCompat.GetColor(this, Resource.Color.primary_dark))); Window.DecorView.SystemUiVisibility = StatusBarVisibility.Visible; } adapter = new TabAdapter(this, SupportFragmentManager); pager = FindViewById<ViewPager>(Resource.Id.pager); pager.Adapter = adapter; pager.OffscreenPageLimit = 3; SupportActionBar.Title = "Getting Started (1/5)"; pager.PageSelected += (sender, e) => { SupportActionBar.Title = $"Getting Started ({e.Position + 1}/5)"; }; SupportActionBar?.SetDisplayHomeAsUpEnabled(false); SupportActionBar?.SetDisplayShowHomeEnabled(false); // Create your application here }