Example usage for com.facebook.react.views.text TextInlineImageSpan onAttachedToWindow

List of usage examples for com.facebook.react.views.text TextInlineImageSpan onAttachedToWindow

Introduction

In this page you can find the example usage for com.facebook.react.views.text TextInlineImageSpan onAttachedToWindow.

Prototype

public abstract void onAttachedToWindow();

Source Link

Document

Called by the text view from View#onAttachedToWindow() .

Usage

From source file:fr.bamlab.textinput.ReactEditText.java

License:Open Source License

@Override
public void onAttachedToWindow() {
    super.onAttachedToWindow();
    if (mContainsImages && getText() instanceof Spanned) {
        Spanned text = (Spanned) getText();
        TextInlineImageSpan[] spans = text.getSpans(0, text.length(), TextInlineImageSpan.class);
        for (TextInlineImageSpan span : spans) {
            span.onAttachedToWindow();
        }//from   w  w w.j a  va2s.  c  o m
    }
}