Searched refs:mSpanColors (Results 1 – 2 of 2) sorted by relevance
/frameworks/base/core/tests/coretests/src/android/text/ |
D | SpanColorsTest.java | 40 private SpanColors mSpanColors; field in SpanColorsTest 45 mSpanColors = new SpanColors(); in setup() 60 mSpanColors.init(mWorkPaint, mSpannedText, 25, 30); // Beyond the spans in testNoColorFound() 61 assertThat(mSpanColors.getColorAt(27)).isEqualTo(SpanColors.NO_COLOR_FOUND); in testNoColorFound() 66 mSpanColors.init(mWorkPaint, mSpannedText, 1, 4); in testSingleColorSpan() 67 assertThat(mSpanColors.getColorAt(3)).isEqualTo(Color.RED); in testSingleColorSpan() 72 mSpanColors.init(mWorkPaint, mSpannedText, 0, mSpannedText.length()); in testMultipleColorSpans() 73 assertThat(mSpanColors.getColorAt(2)).isEqualTo(Color.RED); in testMultipleColorSpans() 74 assertThat(mSpanColors.getColorAt(5)).isEqualTo(SpanColors.NO_COLOR_FOUND); in testMultipleColorSpans() 75 assertThat(mSpanColors.getColorAt(8)).isEqualTo(Color.GREEN); in testMultipleColorSpans() [all …]
|
/frameworks/base/core/java/android/text/ |
D | Layout.java | 408 if (mSpanColors == null) { in initSpanColors() 409 mSpanColors = new SpanColors(); in initSpanColors() 411 mSpanColors.recycle(); in initSpanColors() 414 mSpanColors = null; in initSpanColors() 1041 if (mSpannedText && mSpanColors != null) { in drawHighContrastBackground() 1042 mSpanColors.init(mWorkPaint, ((Spanned) mText), start, end); in drawHighContrastBackground() 1090 if (!mSpannedText || mSpanColors == null) { in drawHighContrastBackground() 1099 var textColor = mSpanColors.getColorAt(index); in drawHighContrastBackground() 1115 if (mSpanColors != null) { in drawHighContrastBackground() 1116 mSpanColors.recycle(); in drawHighContrastBackground() [all …]
|