Exemplo n.º 1
0
        private void ShowAlert(int titleRes, string message)
        {
            // Show the result fragment only if we are not displaying one at the moment.
            if (this.SupportFragmentManager.FindFragmentByTag(ResultFragmentTag) == null)
            {
                AlertDialogFragment.Create(titleRes, message)
                .Show(this.SupportFragmentManager, ResultFragmentTag);

                // Don't capture unnecessarily when the result is displayed.
                DataCaptureManager.Instance.IdCapture.Enabled = false;
            }
        }
Exemplo n.º 2
0
        public static AlertDialogFragment Create(int title, string message)
        {
            Bundle arguments = new Bundle();

            arguments.PutInt(KeyTitleRes, title);
            arguments.PutString(KeyMessage, message);

            AlertDialogFragment fragment = new AlertDialogFragment
            {
                Arguments = arguments
            };

            return(fragment);
        }