private void ButtonPlayOnClick(object sender, EventArgs eventArgs) { View view = (View)sender; ToastSnackUtil.MakeToast("Starting the game.", true); var activity = new Intent(this, typeof(GameActivity)); var backwardsBeating = FindViewById <CheckBox>(Resource.Id.checkBoxBackwardsBeating).Checked; activity.PutExtra("backwardsBeating", backwardsBeating); StartActivity(activity); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); SetContentView(Resource.Layout.activity_main); var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar); SetSupportActionBar(toolbar); //FloatingActionButton fab = FindViewById<FloatingActionButton>(Resource.Id.fab); //fab.Click += FabOnClick; Button butt = FindViewById <Button>(Resource.Id.buttonPlay); butt.Click += ButtonPlayOnClick; ToastSnackUtil.BindSnackSender(FindViewById(Android.Resource.Id.Content)); }