Lines Matching defs:text

17 package android.support.v4.text;
20 import android.text.SpannableStringBuilder;
24 import static android.support.v4.text.TextDirectionHeuristicsCompat.FIRSTSTRONG_LTR;
27 * Utility class for formatting text for display in a potentially opposite-directionality context
29 * directionality of the text can be either estimated or passed in when known. Provides the
33 * When text in one language is mixed into a document in another, opposite-directionality language,
35 * and the text surrounding it may be displayed incorrectly unless the inserted string is explicitly
36 * separated from the surrounding text in a "wrapper" that:
46 * separate opposite-direction text that happens to follow it in-line (even if separated by
48 * happen there, but only with more opposite-direction text, not a number. One approach is to
50 * direction text is itself bidi-wrapped, the "reset" after it will prevent the sticking. (Doing
57 * since the message's opposite-direction text could be followed by an inserted number, which we
68 * How does one know whether a string about to be inserted into surrounding text has the same
82 * The default text direction heuristic.
259 * @param heuristic The default text direction heuristic.
286 * declaration wrapping) prevents it from "sticking" to other opposite-directionality text or a
293 * @param heuristic The text direction heuristic that will be used to estimate the {@code str}'s
295 * @return LRM for RTL text in LTR context; RLM for LTR text in RTL context;
314 * declaration wrapping) prevents it from "sticking" to other opposite-directionality text
321 * @param heuristic The text direction heuristic that will be used to estimate the {@code str}'s
323 * @return LRM for RTL text in LTR context; RLM for LTR text in RTL context;
339 * Estimates the directionality of a string using the default text direction heuristic.
361 * Formats a string of given directionality for use in plain-text output of the context
366 * the string with Unicode bidi formatting characters: RLE+{@code str}+PDF for RTL text, or
367 * LRE+{@code str}+PDF for LTR text.
396 * android.support.v4.text.TextDirectionHeuristicCompat, boolean)}, but takes a CharSequence
401 * See {@link android.support.v4.text.TextDirectionHeuristicsCompat} for pre-defined
432 * Operates like {@link #unicodeWrap(String, android.support.v4.text.TextDirectionHeuristicCompat, boolean)}, but assumes
445 * android.support.v4.text.TextDirectionHeuristicCompat, boolean)}, but assumes {@code isolate}
450 * See {@link android.support.v4.text.TextDirectionHeuristicsCompat} for pre-defined
459 * Operates like {@link #unicodeWrap(String, android.support.v4.text.TextDirectionHeuristicCompat, boolean)}, but uses the
473 * android.support.v4.text.TextDirectionHeuristicCompat, boolean)}, but uses the formatter's
486 * Operates like {@link #unicodeWrap(String, android.support.v4.text.TextDirectionHeuristicCompat, boolean)}, but uses the
498 * android.support.v4.text.TextDirectionHeuristicCompat, boolean)}, but uses the formatter's
592 * The text to be scanned.
594 private final CharSequence text;
597 * Whether the text to be scanned is to be treated as HTML, i.e. skipping over tags and
603 * The length of the text in chars.
608 * The current position in the text.
623 * @param text The string to scan.
624 * @param isHtml Whether the text to be scanned is to be treated as HTML, i.e. skipping over
627 DirectionalityEstimator(CharSequence text, boolean isHtml) {
628 this.text = text;
630 length = text.length();
815 lastChar = text.charAt(charIndex);
817 int codePoint = Character.codePointAt(text, charIndex);
845 lastChar = text.charAt(charIndex - 1);
847 int codePoint = Character.codePointBefore(text, charIndex);
873 lastChar = text.charAt(charIndex++);
881 while (charIndex < length && (lastChar = text.charAt(charIndex++)) != quote) {}
895 * skipTagBackward() in a loop remains linear in the size of the text, even for a text like
902 lastChar = text.charAt(--charIndex);
913 while (charIndex > 0 && (lastChar = text.charAt(--charIndex)) != quote) {}
928 while (charIndex < length && (lastChar = text.charAt(charIndex++)) != ';') {}
939 * linear in the size of the text, even for a text like ";;;;;;;", because skipTagBackward()
945 lastChar = text.charAt(--charIndex);