Home
last modified time | relevance | path

Searched refs:span (Results 1 – 25 of 86) sorted by relevance

1234

/frameworks/ex/widget/java/com/android/ex/widget/
DStaggeredGridView.java139 public int span; field in StaggeredGridView.LayoutRecord
146 mMargins = new int[span * 2]; in ensureMargins()
183 " s=" + span; in toString()
519 final int colEnd = lp.column + Math.min(mColCount, lp.span); in recycleOffscreenViews()
774 final int span = Math.min(mColCount, lp.span); in layoutChildren() local
775 final int widthSize = colWidth * span + itemMargin * (span - 1); in layoutChildren()
792 if (span > 1) { in layoutChildren()
794 for (int j = col + 1; j < col + span; j++) { in layoutChildren()
808 for (int j = col; j < col + span; j++) { in layoutChildren()
819 if (rec != null && rec.span != span) { in layoutChildren()
[all …]
/frameworks/opt/setupwizard/library/platform/src/com/android/setupwizardlib/view/
DRichTextView.java30 import com.android.setupwizardlib.span.LinkSpan;
31 import com.android.setupwizardlib.span.LinkSpan.OnLinkClickListener;
32 import com.android.setupwizardlib.span.SpanHelper;
68 for (Annotation span : spans) { in getRichText()
69 final String key = span.getKey(); in getRichText()
71 String textAppearance = span.getValue(); in getRichText()
80 SpanHelper.replaceSpan(spannable, span, textAppearanceSpan); in getRichText()
82 LinkSpan link = new LinkSpan(span.getValue()); in getRichText()
83 SpanHelper.replaceSpan(spannable, span, link); in getRichText()
169 public boolean onLinkClick(LinkSpan span) { in onLinkClick() argument
[all …]
/frameworks/opt/setupwizard/library/gingerbread/src/com/android/setupwizardlib/util/
DLinkAccessibilityHelper.java178 for (ClickableSpan span : linkSpans) { in getVisibleVirtualViews()
179 virtualViewIds.add(spannedText.getSpanStart(span)); in getVisibleVirtualViews()
186 final ClickableSpan span = getSpanForOffset(virtualViewId); in onPopulateEventForVirtualView() local
187 if (span != null) { in onPopulateEventForVirtualView()
188 event.setContentDescription(getTextForSpan(span)); in onPopulateEventForVirtualView()
198 final ClickableSpan span = getSpanForOffset(virtualViewId); in onPopulateNodeForVirtualView() local
199 if (span != null) { in onPopulateNodeForVirtualView()
200 info.setContentDescription(getTextForSpan(span)); in onPopulateNodeForVirtualView()
207 getBoundsForSpan(span, tempRect); in onPopulateNodeForVirtualView()
220 ClickableSpan span = getSpanForOffset(virtualViewId); in onPerformActionForVirtualView() local
[all …]
/frameworks/opt/setupwizard/library/gingerbread/src/com/android/setupwizardlib/view/
DRichTextView.java34 import com.android.setupwizardlib.span.LinkSpan;
35 import com.android.setupwizardlib.span.LinkSpan.OnLinkClickListener;
36 import com.android.setupwizardlib.span.SpanHelper;
68 for (Annotation span : spans) { in getRichText()
69 final String key = span.getKey(); in getRichText()
71 String textAppearance = span.getValue(); in getRichText()
80 SpanHelper.replaceSpan(spannable, span, textAppearanceSpan); in getRichText()
82 LinkSpan link = new LinkSpan(span.getValue()); in getRichText()
83 SpanHelper.replaceSpan(spannable, span, link); in getRichText()
209 public boolean onLinkClick(LinkSpan span) { in onLinkClick() argument
[all …]
/frameworks/base/core/java/android/widget/
DTableRow.java170 for (int j = 0; j < layoutParams.span; j++) { in mapIndexAndColumns()
200 final int span = lp.span; in measureChildBeforeLayout() local
202 for (int i = 0; i < span; i++) { in measureChildBeforeLayout()
260 return layoutParams.span - 1; in getChildrenSkipCount()
300 if (layoutParams.span == 1) { in getColumnsWidths()
410 public int span; field in TableRow.LayoutParams
428 span = a.getInt(com.android.internal.R.styleable.TableRow_Cell_layout_span, 1); in LayoutParams()
429 if (span <= 1) { in LayoutParams()
430 span = 1; in LayoutParams()
445 span = 1; in LayoutParams()
[all …]
DGridLayout.java699 Interval span = spec.span; in getDefaultMargin() local
701 boolean isAtEdge = leading1 ? (span.min == 0) : (span.max == axis.getCount()); in getDefaultMargin()
722 int index = leading ? spec.span.min : spec.span.max; in getMargin()
777 final Interval majorRange = majorSpec.span; in validateLayoutParams()
785 final Interval minorRange = minorSpec.span; in validateLayoutParams()
861 Interval span = spec.span; in checkLayoutParams() local
862 if (span.min != UNDEFINED && span.min < 0) { in checkLayoutParams()
868 if (span.max > count) { in checkLayoutParams()
872 if (span.size() > count) { in checkLayoutParams()
1050 Interval span = spec.span; in measureChildrenWithMargins() local
[all …]
/frameworks/base/tools/aapt2/compile/
DPseudolocaleGenerator.cpp56 inline static UnifiedSpan SpanToUnifiedSpan(const StringPool::Span& span) { in SpanToUnifiedSpan() argument
57 return UnifiedSpan{*span.name, span.first_char, span.last_char}; in SpanToUnifiedSpan()
146 UnifiedSpan* span = span_idx >= merged_spans.size() ? nullptr : &merged_spans[span_idx]; in PseudolocalizeStyledString() local
149 if (span != nullptr) { in PseudolocalizeStyledString()
150 if (parent_span == nullptr || parent_span->last_char > span->first_char) { in PseudolocalizeStyledString()
153 const StringPiece16 substr = text.substr(cursor, span->first_char - cursor); in PseudolocalizeStyledString()
166 span->first_char = new_cursor; in PseudolocalizeStyledString()
167 if (!span->tag) { in PseudolocalizeStyledString()
209 for (UnifiedSpan& span : merged_spans) { in PseudolocalizeStyledString()
210 if (span.tag) { in PseudolocalizeStyledString()
[all …]
/frameworks/base/tools/aapt/
DStringPool.cpp207 entry_style_span span; in addStyleSpan() local
208 span.name = name; in addStyleSpan()
209 span.span.firstChar = start; in addStyleSpan()
210 span.span.lastChar = end; in addStyleSpan()
211 return addStyleSpan(idx, span); in addStyleSpan()
226 status_t StringPool::addStyleSpan(size_t idx, const entry_style_span& span) in addStyleSpan() argument
234 style.spans.add(span); in addStyleSpan()
414 entry_style_span& span = style.spans.editItemAt(i); in writeStringBlock() local
415 ssize_t idx = add(span.name, true); in writeStringBlock()
418 String8(span.name).string()); in writeStringBlock()
[all …]
/frameworks/base/core/java/android/text/
DAlteredCharSequence.java72 public int getSpanStart(Object span) { in getSpanStart() argument
73 return mSpanned.getSpanStart(span); in getSpanStart()
76 public int getSpanEnd(Object span) { in getSpanEnd() argument
77 return mSpanned.getSpanEnd(span); in getSpanEnd()
80 public int getSpanFlags(Object span) { in getSpanFlags() argument
81 return mSpanned.getSpanFlags(span); in getSpanFlags()
DSpanSet.java64 final E span = allSpans[i]; in init() local
66 final int spanStart = spanned.getSpanStart(span); in init()
67 final int spanEnd = spanned.getSpanEnd(span); in init()
70 final int spanFlag = spanned.getSpanFlags(span); in init()
72 spans[numberOfSpans] = span; in init()
/frameworks/base/tools/aapt2/
DStringPool_test.cpp168 const StringPool::Span& span = ref->spans.front(); in TEST() local
169 EXPECT_THAT(*span.name, Eq("b")); in TEST()
170 EXPECT_THAT(span.first_char, Eq(2u)); in TEST()
171 EXPECT_THAT(span.last_char, Eq(6u)); in TEST()
287 const ResStringPool_span* span = test.styleAt(0); in TEST() local
288 ASSERT_THAT(span, NotNull()); in TEST()
289 EXPECT_THAT(util::GetString(test, span->name.index), Eq("b")); in TEST()
290 EXPECT_THAT(util::GetString16(test, span->name.index), Eq(u"b")); in TEST()
291 EXPECT_THAT(span->firstChar, Eq(0u)); in TEST()
292 EXPECT_THAT(span->lastChar, Eq(1u)); in TEST()
[all …]
DStringPool.cpp134 for (const Span& span : entry_->spans) { in operator ==() local
136 if (span.first_char != rhs_span.first_char || span.last_char != rhs_span.last_char || in operator ==()
137 span.name != rhs_span.name) { in operator ==()
213 for (const aapt::Span& span : str.spans) { in MakeRef() local
214 entry->spans.emplace_back(Span{MakeRef(span.name), span.first_char, span.last_char}); in MakeRef()
228 for (const Span& span : ref.entry_->spans) { in MakeRef() local
229 entry->spans.emplace_back(Span{MakeRef(*span.name), span.first_char, span.last_char}); in MakeRef()
475 android::ResStringPool_span* span = in Flatten() local
478 span->name.index = util::HostToDevice32(s.name.index()); in Flatten()
479 span->firstChar = util::HostToDevice32(s.first_char); in Flatten()
[all …]
/frameworks/base/core/java/android/view/
DScaleGestureDetector.java331 final float span; in onTouchEvent() local
333 span = spanY; in onTouchEvent()
335 span = (float) Math.hypot(spanX, spanY); in onTouchEvent()
344 if (!inAnchoredScaleMode() && mInProgress && (span < mMinSpan || configChanged)) { in onTouchEvent()
347 mInitialSpan = span; in onTouchEvent()
352 mInitialSpan = mPrevSpan = mCurrSpan = span; in onTouchEvent()
356 if (!mInProgress && span >= minSpan && in onTouchEvent()
357 (wasInProgress || Math.abs(span - mInitialSpan) > mSpanSlop)) { in onTouchEvent()
360 mPrevSpan = mCurrSpan = span; in onTouchEvent()
369 mCurrSpan = span; in onTouchEvent()
/frameworks/base/core/java/com/android/internal/widget/
DGridLayoutManager.java387 int span = getSpanIndex(recycler, state, anchorInfo.mPosition); in ensureAnchorIsInCorrectSpan() local
390 while (span > 0 && anchorInfo.mPosition > 0) { in ensureAnchorIsInCorrectSpan()
392 span = getSpanIndex(recycler, state, anchorInfo.mPosition); in ensureAnchorIsInCorrectSpan()
398 int bestSpan = span; in ensureAnchorIsInCorrectSpan()
425 final int span = getSpanIndex(recycler, state, position); in findReferenceChild() local
426 if (span != 0) { in findReferenceChild()
760 int span, start, end, diff; in assignSpans() local
771 span = 0; in assignSpans()
776 params.mSpanIndex = span; in assignSpans()
777 span += params.mSpanSize; in assignSpans()
[all …]
/frameworks/base/core/tests/coretests/src/android/text/
DTextLineTest.java274 final TestReplacementSpan span = new TestReplacementSpan(); in testHandleRun_ellipsizedReplacementSpan_isSkipped() local
275 text.setSpan(span, 9, 12, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testHandleRun_ellipsizedReplacementSpan_isSkipped()
282 assertFalse(span.mIsUsed); in testHandleRun_ellipsizedReplacementSpan_isSkipped()
290 final TestReplacementSpan span = new TestReplacementSpan(); in testHandleRun_notEllipsizedReplacementSpan_isNotSkipped() local
291 text.setSpan(span, 1, 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testHandleRun_notEllipsizedReplacementSpan_isNotSkipped()
298 assertTrue(span.mIsUsed); in testHandleRun_notEllipsizedReplacementSpan_isNotSkipped()
306 final TestReplacementSpan span = new TestReplacementSpan(); in testHandleRun_halfEllipsizedReplacementSpan_isNotSkipped() local
307 text.setSpan(span, 7, 11, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testHandleRun_halfEllipsizedReplacementSpan_isNotSkipped()
313 assertTrue(span.mIsUsed); in testHandleRun_halfEllipsizedReplacementSpan_isNotSkipped()
DTextUtilsTest.java679 Object span = new Object(); in testToUpperCase() local
680 str.setSpan(span, 1, 2, Spanned.SPAN_INCLUSIVE_INCLUSIVE); in testToUpperCase()
688 assertSame(span, resultSpans[0]); in testToUpperCase()
689 assertEquals(1, spanned.getSpanStart(span)); in testToUpperCase()
690 assertEquals(2, spanned.getSpanEnd(span)); in testToUpperCase()
691 assertEquals(Spanned.SPAN_INCLUSIVE_INCLUSIVE, spanned.getSpanFlags(span)); in testToUpperCase()
743 final Object span = sourceSpans[i]; in testToUpperCase_SpansArePreserved() local
744 assertEquals(indexMap[source.getSpanStart(span)], result.getSpanStart(span)); in testToUpperCase_SpansArePreserved()
745 assertEquals(indexMap[source.getSpanEnd(span)], result.getSpanEnd(span)); in testToUpperCase_SpansArePreserved()
746 assertEquals(source.getSpanFlags(span), result.getSpanFlags(span)); in testToUpperCase_SpansArePreserved()
/frameworks/base/core/java/com/android/internal/util/
DContrastColorUtil.java188 for (Object span : spans) { in invertCharSequenceColors()
189 Object resultSpan = span; in invertCharSequenceColors()
191 resultSpan = ((CharacterStyle) span).getUnderlying(); in invertCharSequenceColors()
195 (TextAppearanceSpan) span); in invertCharSequenceColors()
200 resultSpan = span; in invertCharSequenceColors()
207 resultSpan = span; in invertCharSequenceColors()
209 builder.setSpan(resultSpan, ss.getSpanStart(span), ss.getSpanEnd(span), in invertCharSequenceColors()
210 ss.getSpanFlags(span)); in invertCharSequenceColors()
217 private TextAppearanceSpan processTextAppearanceSpan(TextAppearanceSpan span) { in processTextAppearanceSpan() argument
218 ColorStateList colorStateList = span.getTextColor(); in processTextAppearanceSpan()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
DTextViewTransformState.java76 Object span = spans[i]; in hasSameSpans() local
78 if (!span.getClass().equals(otherSpan.getClass())) { in hasSameSpans()
81 if (ownSpanned.getSpanStart(span) != otherSpanned.getSpanStart(otherSpan) in hasSameSpans()
82 || ownSpanned.getSpanEnd(span) != otherSpanned.getSpanEnd(otherSpan)) { in hasSameSpans()
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/span/
DLinkSpan.java17 package com.android.setupwizardlib.span;
60 void onClick(LinkSpan span); in onClick() argument
75 boolean onLinkClick(LinkSpan span); in onLinkClick() argument
/frameworks/base/core/java/android/view/textclassifier/
DTextLinksParams.java125 final TextLinkSpan span = mSpanFactory.apply(link); in apply() local
126 if (span != null) { in apply()
134 text.setSpan(span, link.getStart(), link.getEnd(), in apply()
139 text.setSpan(span, link.getStart(), link.getEnd(), in apply()
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/span/
DLinkSpanTest.java17 package com.android.setupwizardlib.span;
104 public void onClick(LinkSpan span) { in onClick() argument
105 clickedSpan = span; in onClick()
/frameworks/base/services/core/java/com/android/server/notification/
DCountdownConditionProvider.java125 final CharSequence span = in onSubscribe() local
137 ACTION, ts(mTime), mTime - now, span, ts(now))); in onSubscribe()
170 final CharSequence span = in tryParseDescription() local
173 ts(time), time - now, span, ts(now)); in tryParseDescription()
/frameworks/native/libs/ui/
DRegion.cpp476 FatVector<Rect> span; member in android::Region::rasterizer
499 if (span.size()) { in ~rasterizer()
519 if (span.size()) { in operator ()()
527 span.push_back(rect); in operator ()()
528 cur = span.data() + (span.size() - 1); in operator ()()
534 if (tail-head == ssize_t(span.size())) { in flushSpan()
535 Rect const* p = span.data(); in flushSpan()
550 const int bottom = span.front().bottom; in flushSpan()
557 bounds.left = min(span.front().left, bounds.left); in flushSpan()
558 bounds.right = max(span.back().right, bounds.right); in flushSpan()
[all …]
/frameworks/ex/common/java/com/android/ex/editstyledtext/
DEditStyledText.java1329 for (Object span : spansBefore) { in updateSpanPreviousFromCursor()
1330 if (span instanceof ForegroundColorSpan || span instanceof AbsoluteSizeSpan in updateSpanPreviousFromCursor()
1331 || span instanceof MarqueeSpan || span instanceof AlignmentSpan) { in updateSpanPreviousFromCursor()
1332 int spanstart = txt.getSpanStart(span); in updateSpanPreviousFromCursor()
1333 int spanend = txt.getSpanEnd(span); in updateSpanPreviousFromCursor()
1335 Log.d(LOG_TAG, "spantype:" + span.getClass() + "," + spanstart); in updateSpanPreviousFromCursor()
1338 if (span instanceof MarqueeSpan || span instanceof AlignmentSpan) { in updateSpanPreviousFromCursor()
1350 txt.setSpan(span, spanstart, tempmax, in updateSpanPreviousFromCursor()
1353 } else if (span instanceof HorizontalLineSpan) { in updateSpanPreviousFromCursor()
1354 int spanstart = txt.getSpanStart(span); in updateSpanPreviousFromCursor()
[all …]
/frameworks/base/media/java/android/media/
DSRTRenderer.java97 TextTrackCueSpan[] span = new TextTrackCueSpan[] { in onData() local
100 cue.mLines[i++] = span; in onData()
140 TextTrackCueSpan[] span = new TextTrackCueSpan[] { in onData() local
144 cue.mLines[i++] = span; in onData()

1234