public TextEditorFragment(EditImageActivity imageActivity, EditColorActivity editColorActivity)
 {
     try
     {
         ImageActivity     = imageActivity;
         EditColorActivity = editColorActivity;
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }
示例#2
0
 public TextEditorFragment(/*EditImageActivity imageActivity,*/ EditColorActivity editColorActivity)
 {
     try
     {
         //ImageActivity = imageActivity;
         EditColorActivity = editColorActivity;
     }
     catch (Exception e)
     {
         Methods.DisplayReportResultTrack(e);
     }
 }
示例#3
0
 public ColorFragment(NiceArtEditor mNiceArtEditor, EditColorActivity colorActivity)
 {
     // Required empty public constructor
     NiceArtEditor = mNiceArtEditor;
     ColorActivity = colorActivity;
 }
        //Show dialog with provide text and text color
        public TextEditorFragment Show(Activity contextActivity, EditImageActivity imageActivity, EditColorActivity editColorActivity, string inputText, int colorCode, ViewTextType type)
        {
            try
            {
                TextType = type;

                var args = new Bundle();
                args.PutString(ExtraInputText, inputText);
                args.PutInt(ExtraColorCode, colorCode);
                var fragment = new TextEditorFragment(imageActivity, editColorActivity)
                {
                    Arguments = args
                };

                if (imageActivity != null)
                {
                    fragment.Show(imageActivity.SupportFragmentManager, "TextEditorFragment");
                }
                else if (editColorActivity != null)
                {
                    fragment.Show(editColorActivity.SupportFragmentManager, "TextEditorFragment");
                }

                fragment.SetOnTextEditorListener(this);
                return(fragment);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(null);
            }
        }
示例#5
0
        //Show dialog with provide text and text color
        public TextEditorFragment Show(Activity contextActivity /*, EditImageActivity imageActivity*/, EditColorActivity editColorActivity, string inputText, int colorCode, ViewTextType type)
        {
            try
            {
                TextType = type;

                var args = new Bundle();
                args.PutString(ExtraInputText, inputText);
                args.PutInt(ExtraColorCode, colorCode);
                var fragment = new TextEditorFragment(/*imageActivity,*/ editColorActivity)
                {
                    Arguments = args
                };

                //if (imageActivity != null)
                //    fragment.Show(imageActivity.SupportFragmentManager, "TextEditorFragment");
                //else
                if (editColorActivity != null)
                {
                    fragment.Show(editColorActivity.SupportFragmentManager, "TextEditorFragment");
                }

                fragment.SetOnTextEditorListener(this);
                return(fragment);
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
                return(null !);
            }
        }