Lines Matching refs:text
17 package android.text.method;
24 import android.text.*;
25 import android.text.method.TextKeyListener.Capitalize;
26 import android.text.style.ReplacementSpan;
31 import java.text.BreakIterator;
39 * Provides a basic foundation for entering and editing text.
90 private static int adjustReplacementSpan(CharSequence text, int offset, boolean moveToStart) {
91 if (!(text instanceof Spanned)) {
95 ReplacementSpan[] spans = ((Spanned) text).getSpans(offset, offset, ReplacementSpan.class);
97 final int start = ((Spanned) text).getSpanStart(spans[i]);
98 final int end = ((Spanned) text).getSpanEnd(spans[i]);
108 private static int getOffsetForBackspaceKey(CharSequence text, int offset) {
155 final int codePoint = Character.codePointBefore(text, tmpOffset);
278 return adjustReplacementSpan(text, offset - deleteCharCount, true /* move to the start */);
282 private static int getOffsetForForwardDeleteKey(CharSequence text, int offset, Paint paint) {
283 final int len = text.length();
289 offset = paint.getTextRunCursor(text, offset, len, Paint.DIRECTION_LTR /* not used */,
292 return adjustReplacementSpan(text, offset, false /* move to the end */);
475 * the event's text into the content.
492 CharSequence text = event.getCharacters();
493 if (text == null) {
497 content.replace(selectionStart, selectionEnd, text);