コード例 #1
0
        public async Task <bool> ConfirmAsync(string title, string message, string accept, string cancel)
        {
            var fragmentManager       = ViewProvider.GetCurrentActivity().SupportFragmentManager;
            var confirmDialogFragment = ConfirmDialogFragment.NewInstance(title, message, accept, cancel);

            return(await confirmDialogFragment.ShowAsync(fragmentManager, DialogFragmentTag));
        }
コード例 #2
0
        internal static ConfirmDialogFragment NewInstance(string title, string message, string accept, string cancel)
        {
            var fragment = new ConfirmDialogFragment();
            var args     = new Bundle();

            args.PutString(TitleArgumentKey, title);
            args.PutString(MessageArgumentKey, message);
            args.PutString(AcceptArgumentKey, accept);
            args.PutString(CancelArgumentKey, cancel);
            fragment.Arguments = args;

            return(fragment);
        }