@Nullable
    public MentionSpan getMentionSpanAtOffset(int index) {
        MentionSpan[] spans = getSpans(index, index, MentionSpan.class);
        return (spans != null && spans.length > 0) ? spans[0] : null;
    }
@Nullable
    public MentionSpan getMentionSpanAtOffset(int index) {
        MentionSpan[] spans = getSpans(index, index, MentionSpan.class);
        return (spans != null && spans.length > 0) ? spans[0] : null;
    }
@ Nullable public MentionSpan getMentionSpanAtOffset ( int index ) { MentionSpan [ ] spans = getSpans ( index , index , MentionSpan . class ) ; return ( spans != null && spans . length > 0 ) ? spans [ 0 ] : null ; }
Given an integer offset, return the {@link MentionSpan} located at the offset in the text of the
{@link android.widget.EditText}, if it exists. Otherwise, return null.

@param index integer offset in text

@return a {@link MentionSpan} located at index in text, or null
Given an integer offset return the { @link MentionSpan } located at the offset in the text of the { @link android . widget . EditText } if it exists . Otherwise return null .