protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Needs to be called before setting the content view
SupportRequestWindowFeature((int)WindowFeatures.IndeterminateProgress);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.ProgressBar);
var button = FindViewById<Button>(Resource.Id.progress_button);
button.Click += (sender, e) =>
{
// Switch the state of the ProgressBar and set it
indeterminateVisible = !indeterminateVisible;
SetSupportProgressBarIndeterminateVisibility(indeterminateVisible);
// Update the button text
button.Text = indeterminateVisible ? "Stop Progress" : "Start Progress";
SupportInvalidateOptionsMenu();
};
var next = new Intent(this, typeof(UpNavigationActivity));
FindViewById<Button>(Resource.Id.button).Click += (sender, args) => StartActivity(next);
}