/// <summary> /// This add the text on the {@link NiceArtEditorView} with provided parameters /// by default {@link TextView#setText(int)} will be 18sp /// </summary> /// <param name="textTypeface">typeface for custom font in the text</param> /// <param name="text">text to display</param> /// <param name="colorCodeTextView">colorCodeTextView text color to be displayed</param> public void AddText(Typeface textTypeface, string text, string colorCodeTextView) { try { BrushDrawingView.SetBrushDrawingMode(false); TextRootView = GetLayout(ViewType.Text); TextInputTv = TextRootView.FindViewById <TextView>(Resource.Id.tvNiceArtText); FrmBorder = TextRootView.FindViewById <FrameLayout>(Resource.Id.frmBorder); TextView imgCloseText = TextRootView.FindViewById <TextView>(Resource.Id.txtNiceArtClose); imgCloseText.Click += AddTextCloseOnClick; FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeLight, imgCloseText, "\uf00d"); ImgClose = imgCloseText; TextInputTv.Text = text; TextInputTv.SetTextColor(Color.ParseColor(colorCodeTextView)); if (textTypeface != null) { TextInputTv.SetTypeface(textTypeface, TypefaceStyle.Normal); } MultiTouchListener multiTouchListener = GetMultiTouchListener(); multiTouchListener.SetOnGestureControl(this, ViewType.Text); TextRootView.SetOnTouchListener(multiTouchListener); AddViewToParent(TextRootView, ViewType.Text); } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
/// <summary> /// Enable/Disable drawing mode to draw on {@link NiceArtEditorView} /// </summary> /// <param name="brushDrawingMode">true if mode is enabled</param> public void SetBrushDrawingMode(bool brushDrawingMode) { try { BrushDrawingView?.SetBrushDrawingMode(brushDrawingMode); } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
/// <summary> /// Enable/Disable drawing mode to draw on {@link NiceArtEditorView} /// </summary> /// <param name="brushDrawingMode">true if mode is enabled</param> public void SetBrushDrawingMode(bool brushDrawingMode) { try { BrushDrawingView?.SetBrushDrawingMode(brushDrawingMode); } catch (Exception e) { Console.WriteLine(e); } }