//Custom Instantiation For Fragment private CoffeeValueDialog NewDialogInstance() { CoffeeValueDialog coffeeValueDialog = new CoffeeValueDialog(); Bundle bundle = new Bundle(); bundle.PutString("COFFEE_NAME", _coffeeName); coffeeValueDialog.Arguments = bundle; return(coffeeValueDialog); }
//Click Event For StatValues private void StatTextView_Click(object sender, EventArgs e) { //Show CoffeeValueDialog-Fragment CoffeeValueDialog coffeeValueDialog = NewDialogInstance(); FragmentTransaction transaction = Activity.SupportFragmentManager.BeginTransaction() .SetCustomAnimations(Resource.Animation.enter_from_left, Resource.Animation.exit_to_left) .Add(Resource.Id.main_content, coffeeValueDialog) .AddToBackStack("coffeeValueDialog"); transaction.Commit(); Activity.SupportFragmentManager.ExecutePendingTransactions(); //Listen For CoffeeValueDialogComplete-Event coffeeValueDialog.CoffeeValueDialogComplete += (o, args) => SetupStatValues(); }