/cts/tests/tests/text/src/android/text/style/cts/ |
D | UnderlineSpanTest.java | 95 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 …]
|
D | StrikethroughSpanTest.java | 98 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()
|
D | SuggestionSpanTest.java | 215 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/ |
D | StaticLayoutGetLineLeftRightTest.java | 149 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()
|
D | TextUtilsTest.java | 213 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 …]
|
D | StaticLayoutTest.java | 1222 int textWidth = (int) (mDefaultPaint.measureText(text) + 1); 1224 mDefaultPaint, textWidth) 1228 .setEllipsizedWidth(textWidth)
|
/cts/tests/tests/text/src/android/text/method/cts/ |
D | TouchTest.java | 121 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()
|
D | BaseMovementMethodTest.java | 189 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()
|