Exemplo n.º 1
0
        /*
        public override bool OnCreateOptionsMenu (ActionBar_Sherlock.View.IMenu menu)
        {
            base.OnCreateOptionsMenu (menu);
            SupportMenuInflater.Inflate (Resource.Menu.report_menu, menu);
            return true;
        }
        */

        private async void SubmitNewCrueltySpot(CrueltySpot newCrueltySpot)
        {
            var crueltySpotsService = new CrueltySpotsService();
            var newCrueltySpotId = await crueltySpotsService.SaveAsync(newCrueltySpot);

            fa.RunOnUiThread(() =>
            {
                var intent = new Intent(fa, typeof(CrueltySpotActivity));
                intent.PutExtra(AppConstants.ShowCrueltySpotAddedSuccessfullyKey, true);
                intent.PutExtra(AppConstants.CrueltySpotIdKey, newCrueltySpotId);
                ClearAllUi();
                _crueltyReport.ClearAll();
                CommitCrueltyReport();
                StartActivity(intent);
                _loadingDialog.Dismiss();
            });
        }