Lines Matching defs:spans

512     // XXX currently this only reverses chars, not spans
816 * Debugging tool to print the spans in a CharSequence. The output will
835 printer.println(prefix + cs + ": (no spans)");
950 ReplacementSpan[] spans = ((Spanned) text).getSpans(offset, offset,
953 for (int i = 0; i < spans.length; i++) {
954 int start = ((Spanned) text).getSpanStart(spans[i]);
955 int end = ((Spanned) text).getSpanEnd(spans[i]);
987 ReplacementSpan[] spans = ((Spanned) text).getSpans(offset, offset,
990 for (int i = 0; i < spans.length; i++) {
991 int start = ((Spanned) text).getSpanStart(spans[i]);
992 int end = ((Spanned) text).getSpanEnd(spans[i]);
1007 * Copies the spans from the region <code>start...end</code> in
1014 * @throws IndexOutOfBoundsException if any of the copied spans
1024 Object[] spans = source.getSpans(start, end, kind);
1026 for (int i = 0; i < spans.length; i++) {
1027 int st = source.getSpanStart(spans[i]);
1028 int en = source.getSpanEnd(spans[i]);
1029 int fl = source.getSpanFlags(spans[i]);
1036 dest.setSpan(spans[i], st - start + destoff, en - start + destoff,
1296 MetricAffectingSpan[] spans = sp.getSpans(
1298 spans = TextUtils.removeEmptySpans(spans, sp, MetricAffectingSpan.class);
1299 width += mt.addStyleRun(paint, spans, spanEnd - spanStart, null);
1390 * retaining their spans if any.
1662 * Removes empty spans from the <code>spans</code> array.
1664 * When parsing a Spanned using {@link Spanned#nextSpanTransition(int, int, Class)}, empty spans
1668 * However, these empty spans should not be taken into account when layouting or rendering the
1671 * @param spans A list of spans retrieved using {@link Spanned#getSpans(int, int, Class)} from
1673 * @param spanned The Spanned from which spans were extracted
1674 * @return A subset of spans where empty spans ({@link Spanned#getSpanStart(Object)} ==
1679 public static <T> T[] removeEmptySpans(T[] spans, Spanned spanned, Class<T> klass) {
1683 for (int i = 0; i < spans.length; i++) {
1684 final T span = spans[i];
1690 copy = (T[]) Array.newInstance(klass, spans.length - 1);
1691 System.arraycopy(spans, 0, copy, 0, i);
1707 return spans;