/frameworks/base/core/tests/coretests/src/android/widget/ |
LabelView.java | 75 mTextPaint = new Paint(); 76 mTextPaint.setAntiAlias(true); 77 mTextPaint.setTextSize(16); 78 mTextPaint.setColor(0xFF000000); 101 mTextPaint.setTextSize(size); 111 mTextPaint.setColor(color); 140 result = (int) mTextPaint.measureText(mText) + mPaddingLeft 161 mAscent = (int) mTextPaint.ascent(); 167 result = (int) (-mAscent + mTextPaint.descent()) + mPaddingTop 185 canvas.drawText(mText, mPaddingLeft, mPaddingTop - mAscent, mTextPaint); [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/view/ |
LabelView.java | 38 private Paint mTextPaint; 85 mTextPaint = new Paint(); 86 mTextPaint.setAntiAlias(true); 88 mTextPaint.setTextSize(16 * getResources().getDisplayMetrics().density); 89 mTextPaint.setColor(0xFF000000); 109 mTextPaint.setTextSize(size); 119 mTextPaint.setColor(color); 147 result = (int) mTextPaint.measureText(mText) + getPaddingLeft() 168 mAscent = (int) mTextPaint.ascent(); 174 result = (int) (-mAscent + mTextPaint.descent()) + getPaddingTop( [all...] |
InternalSelectionView.java | 47 private Paint mTextPaint = new Paint(); 76 mTextPaint.setAntiAlias(true); 77 mTextPaint.setTextSize(10); 78 mTextPaint.setColor(Color.WHITE); 158 mTextPaint.setAlpha(0xFF); 162 mTextPaint.setAlpha(0xF0); 172 rectTop + 2 - (int) mTextPaint.ascent(), 173 mTextPaint);
|
/sdk/testapps/customViewTest/libWithCustomView/src/com/android/tests/libwithcustom/ |
LabelView.java | 36 private Paint mTextPaint; 84 mTextPaint = new Paint(); 85 mTextPaint.setAntiAlias(true); 87 mTextPaint.setTextSize(16 * getResources().getDisplayMetrics().density); 88 mTextPaint.setColor(0xFF000000); 108 mTextPaint.setTextSize(size); 118 mTextPaint.setColor(color); 146 result = (int) mTextPaint.measureText(mText) + getPaddingLeft() 167 mAscent = (int) mTextPaint.ascent(); 173 result = (int) (-mAscent + mTextPaint.descent()) + getPaddingTop( [all...] |
/cts/tests/tests/text/src/android/text/cts/ |
LayoutTest.java | 41 private TextPaint mTextPaint; 46 mTextPaint = new TextPaint(); 56 new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, mAlign, mSpacingmult, mSpacingadd); 67 Layout layout = new MockLayout(text, mTextPaint, mWidth, 71 layout = new MockLayout(null, mTextPaint, mWidth, mAlign, mSpacingmult, mSpacingadd); 76 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, 79 assertSame(mTextPaint, layout.getPaint()); 86 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 10, 90 layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 0, mAlign, mSpacingmult, mSpacingadd); 95 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 15 [all...] |
/packages/apps/Launcher3/src/com/android/launcher3/ |
BaseRecyclerViewFastScrollPopup.java | 45 private Paint mTextPaint; 58 mTextPaint = new Paint(); 59 mTextPaint.setColor(Color.WHITE); 60 mTextPaint.setAntiAlias(true); 61 mTextPaint.setTextSize(res.getDimensionPixelSize(R.dimen.container_fastscroll_popup_text_size)); 70 mTextPaint.getTextBounds(sectionName, 0, sectionName.length(), mTextBounds); 72 mTextBounds.right = (int) (mTextBounds.left + mTextPaint.measureText(sectionName)); 149 mTextPaint.setAlpha((int) (mAlpha * 255)); 152 mTextPaint);
|
/developers/build/prebuilts/gradle/BasicAccessibility/Application/src/main/java/com/example/android/basicaccessibility/ |
DialView.java | 51 private Paint mTextPaint; 79 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); 80 mTextPaint.setColor(Color.BLACK); 81 mTextPaint.setStyle(Paint.Style.FILL_AND_STROKE); 82 mTextPaint.setTextAlign(Paint.Align.CENTER); 83 mTextPaint.setTextSize(FONT_SIZE); 210 canvas.drawText(Integer.toString(i + 1), x, y, mTextPaint); 218 canvas.drawCircle(x, y, 20, mTextPaint);
|
/developers/samples/android/ui/accessibility/BasicAccessibility/Application/src/main/java/com/example/android/basicaccessibility/ |
DialView.java | 51 private Paint mTextPaint; 79 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); 80 mTextPaint.setColor(Color.BLACK); 81 mTextPaint.setStyle(Paint.Style.FILL_AND_STROKE); 82 mTextPaint.setTextAlign(Paint.Align.CENTER); 83 mTextPaint.setTextSize(FONT_SIZE); 210 canvas.drawText(Integer.toString(i + 1), x, y, mTextPaint); 218 canvas.drawCircle(x, y, 20, mTextPaint);
|
/development/samples/browseable/BasicAccessibility/src/com.example.android.basicaccessibility/ |
DialView.java | 51 private Paint mTextPaint; 79 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); 80 mTextPaint.setColor(Color.BLACK); 81 mTextPaint.setStyle(Paint.Style.FILL_AND_STROKE); 82 mTextPaint.setTextAlign(Paint.Align.CENTER); 83 mTextPaint.setTextSize(FONT_SIZE); 210 canvas.drawText(Integer.toString(i + 1), x, y, mTextPaint); 218 canvas.drawCircle(x, y, 20, mTextPaint);
|
/developers/build/prebuilts/gradle/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/ |
InteractiveWatchFaceService.java | 53 private Paint mTextPaint; 94 mTextPaint = new Paint(); 95 mTextPaint.setColor(mScreenTextColor); 96 mTextPaint.setTypeface(BOLD_TYPEFACE); 97 mTextPaint.setAntiAlias(true); 125 mTextPaint.setTextSize(textSize); 146 mTextPaint.setTypeface(burnInProtection ? NORMAL_TYPEFACE : BOLD_TYPEFACE); 165 mTextPaint.setAntiAlias(antiAlias); 206 mTextPaint); 212 mTextPaint); [all...] |
CalendarWatchFaceService.java | 78 final TextPaint mTextPaint = new TextPaint(); 133 mTextPaint.setColor(FOREGROUND_COLOR); 134 mTextPaint.setTextSize(TEXT_SIZE); 177 mLayout = new DynamicLayout(mEditable, mTextPaint, mLayoutWidth,
|
/developers/samples/android/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/ |
InteractiveWatchFaceService.java | 53 private Paint mTextPaint; 94 mTextPaint = new Paint(); 95 mTextPaint.setColor(mScreenTextColor); 96 mTextPaint.setTypeface(BOLD_TYPEFACE); 97 mTextPaint.setAntiAlias(true); 125 mTextPaint.setTextSize(textSize); 146 mTextPaint.setTypeface(burnInProtection ? NORMAL_TYPEFACE : BOLD_TYPEFACE); 165 mTextPaint.setAntiAlias(antiAlias); 206 mTextPaint); 212 mTextPaint); [all...] |
CalendarWatchFaceService.java | 78 final TextPaint mTextPaint = new TextPaint(); 133 mTextPaint.setColor(FOREGROUND_COLOR); 134 mTextPaint.setTextSize(TEXT_SIZE); 177 mLayout = new DynamicLayout(mEditable, mTextPaint, mLayoutWidth,
|
/development/samples/browseable/WatchFace/Wearable/src/com.example.android.wearable.watchface/ |
InteractiveWatchFaceService.java | 53 private Paint mTextPaint; 94 mTextPaint = new Paint(); 95 mTextPaint.setColor(mScreenTextColor); 96 mTextPaint.setTypeface(BOLD_TYPEFACE); 97 mTextPaint.setAntiAlias(true); 125 mTextPaint.setTextSize(textSize); 146 mTextPaint.setTypeface(burnInProtection ? NORMAL_TYPEFACE : BOLD_TYPEFACE); 165 mTextPaint.setAntiAlias(antiAlias); 206 mTextPaint); 212 mTextPaint); [all...] |
/frameworks/support/design/src/android/support/design/widget/ |
CollapsingTextHelper.java | 99 private final TextPaint mTextPaint; 113 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG | Paint.SUBPIXEL_TEXT_FLAG); 361 mTextPaint.setColor(blendColors( 364 mTextPaint.setColor(getCurrentCollapsedTextColor()); 367 mTextPaint.setShadowLayer( 400 mTextPaint.measureText(mTextToDraw, 0, mTextToDraw.length()) : 0; 408 mCollapsedDrawY = mCollapsedBounds.top - mTextPaint.ascent(); 412 float textHeight = mTextPaint.descent() - mTextPaint.ascent(); 413 float textOffset = (textHeight / 2) - mTextPaint.descent() [all...] |
/frameworks/base/tests/WallpaperTest/src/com/example/wallpapertest/ |
TestWallpaper.java | 79 private final TextPaint mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); 106 TextPaint tpaint = mTextPaint; 113 mTextPaint.getFontMetrics(mTextMetrics); 231 x, y, mTextPaint); 234 x, y, mTextPaint); 237 x, y, mTextPaint); 240 x, y, mTextPaint); 243 x, y, mTextPaint); 247 x, y, mTextPaint); 251 x, y, mTextPaint); [all...] |
/external/sl4a/ScriptingLayerForAndroid/src/org/connectbot/util/ |
ColorsActivity.java | 116 private Paint mTextPaint; 131 mTextPaint = new Paint(); 132 mTextPaint.setAntiAlias(true); 133 mTextPaint.setTextSize(16); 134 mTextPaint.setColor(0xFFFFFFFF); 135 mTextPaint.setTextAlign(Paint.Align.CENTER); 137 mShadowPaint = new Paint(mTextPaint); 166 mAscent = (int) mTextPaint.ascent(); 183 result = (int) mTextPaint.measureText(mText) + getPaddingLeft() + getPaddingRight(); 199 mAscent = (int) mTextPaint.ascent() [all...] |
/frameworks/base/services/core/java/com/android/server/wm/ |
Watermark.java | 44 private final Paint mTextPaint; 89 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); 90 mTextPaint.setTextSize(fontSize); 91 mTextPaint.setTypeface(Typeface.create(Typeface.SANS_SERIF, Typeface.BOLD)); 93 FontMetricsInt fm = mTextPaint.getFontMetricsInt(); 94 mTextWidth = (int)mTextPaint.measureText(mText); 112 mTextPaint.setColor(color); 113 mTextPaint.setShadowLayer(shadowRadius, shadowDx, shadowDy, shadowColor); 169 c.drawText(mText, x, y, mTextPaint);
|
/frameworks/base/core/tests/coretests/src/android/util/ |
InternalSelectionView.java | 55 private Paint mTextPaint = new Paint(); 83 mTextPaint.setAntiAlias(true); 84 mTextPaint.setTextSize(10); 85 mTextPaint.setColor(Color.WHITE); 164 mTextPaint.setAlpha(0xFF); 168 mTextPaint.setAlpha(0xF0); 178 rectTop + 2 - (int) mTextPaint.ascent(), 179 mTextPaint);
|
/frameworks/base/core/java/com/android/internal/widget/ |
SubtitleView.java | 62 private TextPaint mTextPaint; 128 mTextPaint = new TextPaint(); 129 mTextPaint.setAntiAlias(true); 130 mTextPaint.setSubpixelText(true); 185 if (mTextPaint.getTextSize() != size) { 186 mTextPaint.setTextSize(size); 197 if (mTextPaint.getTypeface() != typeface) { 198 mTextPaint.setTypeface(typeface); 260 mText, mTextPaint, maxWidth, mAlignment, mSpacingMult, mSpacingAdd, true); 302 final Paint textPaint = mTextPaint; [all...] |
/packages/apps/TV/usbtuner/src/com/google/android/exoplayer/text/ |
SubtitleView.java | 64 private TextPaint mTextPaint; 112 mTextPaint = new TextPaint(); 113 mTextPaint.setAntiAlias(true); 114 mTextPaint.setSubpixelText(true); 149 if (mTextPaint.getTextSize() != size) { 150 mTextPaint.setTextSize(size); 181 if (mTextPaint.getTypeface() != typeface) { 182 mTextPaint.setTypeface(typeface); 242 mLayout = new StaticLayout(mText, mTextPaint, maxWidth, mAlignment, 259 final Paint textPaint = this.mTextPaint; [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/accessibility/ |
CustomViewAccessibilityActivity.java | 205 private TextPaint mTextPaint; 214 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); 220 mTextPaint.setTextSize(textSize); 224 mTextPaint.setColor(textColor); 265 return new StaticLayout(text, mTextPaint, 266 (int) Math.ceil(Layout.getDesiredWidth(text, mTextPaint)),
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
BatteryHistoryChart.java | 139 final TextPaint mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); 469 mainTextAttrs.apply(context, mTextPaint); 472 mDateLinePaint.set(mTextPaint); 483 mTextPaint.setShadowLayer(r, dx, dy, shadowcolor); 589 mMaxPercentLabelStringWidth = (int)mTextPaint.measureText(mMaxPercentLabelString); 590 mMinPercentLabelStringWidth = (int)mTextPaint.measureText(mMinPercentLabelString); 594 mTextAscent = (int)mTextPaint.ascent(); 595 mTextDescent = (int)mTextPaint.descent(); 698 mTextPaint.setStrokeWidth(mThinLineWidth); [all...] |
/developers/build/prebuilts/gradle/BasicMultitouch/Application/src/main/java/com/example/android/basicmultitouch/ |
TouchDisplayView.java | 324 private Paint mTextPaint = new Paint(); 351 mTextPaint.setTextSize(27f); 352 mTextPaint.setColor(Color.BLACK); 398 - radius, mTextPaint);
|
/developers/samples/android/input/multitouch/BasicMultitouch/Application/src/main/java/com/example/android/basicmultitouch/ |
TouchDisplayView.java | 324 private Paint mTextPaint = new Paint(); 351 mTextPaint.setTextSize(27f); 352 mTextPaint.setColor(Color.BLACK); 398 - radius, mTextPaint);
|