Exemplo n.º 1
0
        public static MessageDialogFragment newInstance(string message)
        {
            MessageDialogFragment fragment = new MessageDialogFragment();
            Bundle args = new Bundle();

            args.PutString(ArgMessageString, message);
            fragment.Arguments = args;
            return(fragment);
        }
Exemplo n.º 2
0
        public static MessageDialogFragment newInstance(int message)
        {
            MessageDialogFragment fragment = new MessageDialogFragment();
            Bundle args = new Bundle();

            args.PutInt(ArgMessageInt, message);
            fragment.Arguments = args;
            return(fragment);
        }
 public override bool OnOptionsItemSelected(IMenuItem item)
 {
     switch (item.ItemId)
     {
     case Resource.Id.info:
     {
         MessageDialogFragment.newInstance(Resource.String.intro_message)
         .Show(SupportFragmentManager, FragmentDialog);
         break;
     }
     }
     return(base.OnOptionsItemSelected(item));
 }
 //
 // Utility methods
 //
 public void ShowErrorDialog(string errorMessage)
 {
     MessageDialogFragment.newInstance(errorMessage)
     .Show(SupportFragmentManager, FragmentDialog);
 }
 //
 // Show help dialogs.
 //
 public void OnClick(View v)
 {
     MessageDialogFragment.newInstance(Resource.String.help_text)
     .Show(SupportFragmentManager, FragmentDialog);
 }