public override Dialog OnCreateDialog(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            var builder = new AlertDialog.Builder(Activity);

            var inflater = Activity.LayoutInflater;

            var dialogView = inflater.Inflate(Resource.Layout.ExpenseDetailsView, null);

            if (dialogView != null)
            {
                editDate     = dialogView.FindViewById <EditText>(Resource.Id.editExpenseDateDialog);
                editAmount   = dialogView.FindViewById <EditText>(Resource.Id.editExpenseAmountDialog);
                editDetails  = dialogView.FindViewById <EditText>(Resource.Id.editExpenseDetailsDialog);
                catText      = dialogView.FindViewById <TextView>(Resource.Id.textView145);
                spinner      = dialogView.FindViewById <Spinner>(Resource.Id.spinnerExpenseEdit);
                changeCatBtn = dialogView.FindViewById <Button>(Resource.Id.btnExpenseEdit);

                using (var db = new ExpenseManager())
                {
                    expense = db.GetItemWithChildren(id);
                }

                editDate.Text    = expense.Date.ToShortDateString();
                editAmount.Text  = expense.Amount.ToString();
                editDetails.Text = expense.Details;
                catText.Text     = expense.Category.Name;

                editDate.KeyPress    += EditDate_KeyPress;
                editAmount.KeyPress  += EditAmount_KeyPress;
                editDetails.KeyPress += EditDetails_KeyPress;
                changeCatBtn.Click   += ChangeCatBtn_Click;

                LoadSpinnerData();
                spinner.ItemSelected += Spinner_ItemSelected;

                builder.SetView(dialogView);
                builder.SetPositiveButton("Zapisz zmiany", HandlePositiveButtonClick);
                builder.SetNeutralButton("Wróć", HandleNeutralButtonClick);
                builder.SetNegativeButton("Usuń", HandleNegativeButtonClick);
            }


            var dialog = builder.Create();

            return(dialog);
        }