Pre loader

TextAnnotation text edited event

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

How do I know when user edited the text on TextAnnoation so the app can save it?
How to do the same for https://www.scichart.com/questions/wpf/get-textannotation-text-after-user-editing for Android and iOS version of SciChart?

Version
3.1
  • You must to post comments
0
0

Hi there,

For Android we don’t provide direct listener for text of TextAnnotation, but you can set it for TextView which is used by annotation for displaying text:

final TextAnnotation textAnnotation = sciChartBuilder.newTextAnnotation().withCanEditText(true).withIsEditable(true).build();

final EditText textView = (EditText) textAnnotation.findViewById(R.id.text);
textView.addTextChangedListener(new TextWatcher() {
                @Override
                public void beforeTextChanged(CharSequence s, int start, int count, int after) {

                }

                @Override
                public void onTextChanged(CharSequence s, int start, int before, int count) {
                    Log.d("TextAnnotation", s.toString());
                }

                @Override
                public void afterTextChanged(Editable s) {

                }
            });

textAnnotation.setText("Your text here");  

Hope this will help you!

Best regards,
Yura

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies