/cts/tests/tests/text/src/android/text/style/cts/ |
D | UnderlineSpanTest.java | 105 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 …]
|
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 | 228 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 …]
|
D | StaticLayoutTest.java | 1261 int textWidth = (int) (mDefaultPaint.measureText(text) + 1); 1263 mDefaultPaint, textWidth) 1267 .setEllipsizedWidth(textWidth)
|
/cts/tests/tests/text/src/android/text/method/cts/ |
D | TouchTest.java | 132 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()
|
D | BaseMovementMethodTest.java | 266 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()
|