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.java95 private float textWidth(CharSequence text) { in textWidth() method in UnderlineSpanTest
109 final float origLineWidth = textWidth(text); in testDoesntAffectWidth()
112 final float underlinedLineWidth = textWidth(text); in testDoesntAffectWidth()
117 final float origLineWidth = textWidth(text); in testDoesntAffectWidth()
120 final float underlinedLineWidth = textWidth(text); in testDoesntAffectWidth()
125 final float origLineWidth = textWidth(text); in testDoesntAffectWidth()
128 final float underlinedLineWidth = textWidth(text); in testDoesntAffectWidth()
133 final float origLineWidth = textWidth(text); in testDoesntAffectWidth()
137 final float underlinedLineWidth = textWidth(text); in testDoesntAffectWidth()
152 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.java213 float textWidth = p.measureText("long, 3 plus"); in testCommaEllipsize() local
218 … TextUtils.commaEllipsize(text, p, textWidth - 1.4f, "plus 1", "%d plus").toString()); in testCommaEllipsize()
221 TextUtils.commaEllipsize(text, p, textWidth, "plus 1", "%d plus").toString()); in testCommaEllipsize()
224 textWidth = p.measureText("long, string, 2 more"); in testCommaEllipsize()
226 TextUtils.commaEllipsize(text, p, textWidth, "more 1", "%d more").toString()); in testCommaEllipsize()
229 textWidth = p.measureText("long, string, to, truncate"); in testCommaEllipsize()
231 TextUtils.commaEllipsize(text, p, textWidth, "more 1", "%d more").toString()); in testCommaEllipsize()
235 text + "-extended", p, textWidth, "more 1", "%d more").toString()); in testCommaEllipsize()
244 text + "-extended", p, textWidth, null, "%d more").toString()); in testCommaEllipsize()
247 TextUtils.commaEllipsize(null, p, textWidth, "plus 1", "%d plus"); in testCommaEllipsize()
[all …]
DStaticLayoutTest.java1222 int textWidth = (int) (mDefaultPaint.measureText(text) + 1);
1224 mDefaultPaint, textWidth)
1228 .setEllipsizedWidth(textWidth)
/cts/tests/tests/text/src/android/text/method/cts/
DTouchTest.java121 int textWidth = Math.round(paint.measureText(text)); in testOnTouchEvent() local
122 while (textWidth < screenWidth) { in testOnTouchEvent()
124 textWidth = Math.round(paint.measureText(text)); in testOnTouchEvent()
128 int dragAmount = Math.min(screenWidth, textWidth - screenWidth); in testOnTouchEvent()
DBaseMovementMethodTest.java189 private void setContentView(@NonNull TextView textView, int textWidth) throws Throwable { in setContentView() argument
192 layout.addView(textView, new ViewGroup.LayoutParams(textWidth, WRAP_CONTENT)); in setContentView()