Home
last modified time | relevance | path

Searched refs:textWidth (Results 1 – 8 of 8) sorted by relevance

/cts/tests/tests/text/src/android/text/style/cts/
DUnderlineSpanTest.java105 private float textWidth(CharSequence text) { in textWidth() method in UnderlineSpanTest
119 final float origLineWidth = textWidth(text); in testDoesntAffectWidth()
122 final float underlinedLineWidth = textWidth(text); in testDoesntAffectWidth()
127 final float origLineWidth = textWidth(text); in testDoesntAffectWidth()
130 final float underlinedLineWidth = textWidth(text); in testDoesntAffectWidth()
135 final float origLineWidth = textWidth(text); in testDoesntAffectWidth()
138 final float underlinedLineWidth = textWidth(text); in testDoesntAffectWidth()
143 final float origLineWidth = textWidth(text); in testDoesntAffectWidth()
147 final float underlinedLineWidth = textWidth(text); in testDoesntAffectWidth()
162 final float origLineWidth = textWidth(text); in testDoesntAffectWidth_safeSubclass()
[all …]
DStrikethroughSpanTest.java98 private float textWidth(CharSequence text) { in textWidth() method in StrikethroughSpanTest
111 final float origLineWidth = textWidth(text); in testDoesntAffectWidth()
114 final float strokethroughLineWidth = textWidth(text); in testDoesntAffectWidth()
DSuggestionSpanTest.java215 private float textWidth(CharSequence text) { in textWidth() method in SuggestionSpanTest
228 final float origLineWidth = textWidth(text); in testDoesntAffectWidth()
235 final float underlinedLineWidth = textWidth(text); in testDoesntAffectWidth()
/cts/tests/tests/text/src/android/text/cts/
DStaticLayoutGetLineLeftRightTest.java149 final float textWidth = mPaint.measureText(mText, start, end); in testGetLineLeft() local
154 expectedLeft = mWidth - textWidth - mLeadingMargin; in testGetLineLeft()
157 expectedLeft = (float) Math.floor((mWidth - mLeadingMargin - textWidth) / 2); in testGetLineLeft()
160 + (mWidth - mLeadingMargin - textWidth) / 2); in testGetLineLeft()
173 final float textWidth = mPaint.measureText(mText, start, end); in testGetLineRight() local
176 expectedRight = mLeadingMargin + textWidth; in testGetLineRight()
182 - (mWidth - mLeadingMargin - textWidth) / 2); in testGetLineRight()
185 - (mWidth - mLeadingMargin - textWidth) / 2); in testGetLineRight()
DTextUtilsTest.java228 float textWidth = p.measureText("long, 3 plus"); in testCommaEllipsize() local
233 … TextUtils.commaEllipsize(text, p, textWidth - 1.4f, "plus 1", "%d plus").toString()); in testCommaEllipsize()
236 TextUtils.commaEllipsize(text, p, textWidth, "plus 1", "%d plus").toString()); in testCommaEllipsize()
239 textWidth = p.measureText("long, string, 2 more"); in testCommaEllipsize()
241 TextUtils.commaEllipsize(text, p, textWidth, "more 1", "%d more").toString()); in testCommaEllipsize()
244 textWidth = p.measureText("long, string, to, truncate"); in testCommaEllipsize()
246 TextUtils.commaEllipsize(text, p, textWidth, "more 1", "%d more").toString()); in testCommaEllipsize()
250 text + "-extended", p, textWidth, "more 1", "%d more").toString()); in testCommaEllipsize()
259 text + "-extended", p, textWidth, null, "%d more").toString()); in testCommaEllipsize()
262 TextUtils.commaEllipsize(null, p, textWidth, "plus 1", "%d plus"); in testCommaEllipsize()
[all …]
DStaticLayoutTest.java1261 int textWidth = (int) (mDefaultPaint.measureText(text) + 1);
1263 mDefaultPaint, textWidth)
1267 .setEllipsizedWidth(textWidth)
/cts/tests/tests/text/src/android/text/method/cts/
DTouchTest.java132 int textWidth = Math.round(paint.measureText(text)); in testOnTouchEvent() local
133 while (textWidth < rootViewWidth + touchSlop) { in testOnTouchEvent()
135 textWidth = Math.round(paint.measureText(text)); in testOnTouchEvent()
140 int dragAmount = Math.min(rootViewWidth, textWidth - rootViewWidth) - 1; in testOnTouchEvent()
DBaseMovementMethodTest.java266 private void setContentView(@NonNull TextView textView, int textWidth) throws Throwable { in setContentView() argument
269 layout.addView(textView, new ViewGroup.LayoutParams(textWidth, WRAP_CONTENT)); in setContentView()