Home
last modified time | relevance | path

Searched refs:mTextPaint (Results 1 – 7 of 7) sorted by relevance

/development/samples/ApiDemos/src/com/example/android/apis/view/
DLabelView.java38 private Paint mTextPaint; field in LabelView
85 mTextPaint = new Paint(); in initLabelView()
86 mTextPaint.setAntiAlias(true); in initLabelView()
88 mTextPaint.setTextSize(16 * getResources().getDisplayMetrics().density); in initLabelView()
89 mTextPaint.setColor(0xFF000000); in initLabelView()
109 mTextPaint.setTextSize(size); in setTextSize()
119 mTextPaint.setColor(color); in setTextColor()
147 result = (int) mTextPaint.measureText(mText) + getPaddingLeft() in measureWidth()
168 mAscent = (int) mTextPaint.ascent(); in measureHeight()
174 result = (int) (-mAscent + mTextPaint.descent()) + getPaddingTop() in measureHeight()
[all …]
DInternalSelectionView.java47 private Paint mTextPaint = new Paint(); field in InternalSelectionView
76 mTextPaint.setAntiAlias(true); in init()
77 mTextPaint.setTextSize(10); in init()
78 mTextPaint.setColor(Color.WHITE); in init()
158 mTextPaint.setAlpha(0xFF); in onDraw()
162 mTextPaint.setAlpha(0xF0); in onDraw()
172 rectTop + 2 - (int) mTextPaint.ascent(), in onDraw()
173 mTextPaint); in onDraw() local
/development/samples/browseable/WatchFace/Wearable/src/com.example.android.wearable.watchface/
DInteractiveWatchFaceService.java53 private Paint mTextPaint; field in InteractiveWatchFaceService.Engine
94 mTextPaint = new Paint(); in onCreate()
95 mTextPaint.setColor(mScreenTextColor); in onCreate()
96 mTextPaint.setTypeface(BOLD_TYPEFACE); in onCreate()
97 mTextPaint.setAntiAlias(true); in onCreate()
125 mTextPaint.setTextSize(textSize); in onApplyWindowInsets()
146 mTextPaint.setTypeface(burnInProtection ? NORMAL_TYPEFACE : BOLD_TYPEFACE); in onPropertiesChanged()
165 mTextPaint.setAntiAlias(antiAlias); in onAmbientModeChanged()
206 mTextPaint); in onDraw()
212 mTextPaint); in onDraw()
[all …]
DCalendarWatchFaceService.java78 final TextPaint mTextPaint = new TextPaint(); field in CalendarWatchFaceService.Engine
133 mTextPaint.setColor(FOREGROUND_COLOR); in onCreate()
134 mTextPaint.setTextSize(TEXT_SIZE); in onCreate()
177 mLayout = new DynamicLayout(mEditable, mTextPaint, mLayoutWidth, in onDraw()
/development/samples/browseable/BasicAccessibility/src/com.example.android.basicaccessibility/
DDialView.java51 private Paint mTextPaint; field in DialView
79 mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); in init()
80 mTextPaint.setColor(Color.BLACK); in init()
81 mTextPaint.setStyle(Paint.Style.FILL_AND_STROKE); in init()
82 mTextPaint.setTextAlign(Paint.Align.CENTER); in init()
83 mTextPaint.setTextSize(FONT_SIZE); in init()
210 canvas.drawText(Integer.toString(i + 1), x, y, mTextPaint); in onDraw()
218 canvas.drawCircle(x, y, 20, mTextPaint); in onDraw()
/development/samples/ApiDemos/src/com/example/android/apis/accessibility/
DCustomViewAccessibilityActivity.java205 private TextPaint mTextPaint; field in CustomViewAccessibilityActivity.BaseToggleButton
214 mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); in BaseToggleButton()
220 mTextPaint.setTextSize(textSize); in BaseToggleButton()
224 mTextPaint.setColor(textColor); in BaseToggleButton()
265 return new StaticLayout(text, mTextPaint, in makeLayout()
266 (int) Math.ceil(Layout.getDesiredWidth(text, mTextPaint)), in makeLayout()
/development/samples/browseable/BasicMultitouch/src/com.example.android.basicmultitouch/
DTouchDisplayView.java324 private Paint mTextPaint = new Paint(); field in TouchDisplayView
351 mTextPaint.setTextSize(27f); in initialisePaint()
352 mTextPaint.setColor(Color.BLACK); in initialisePaint()
398 - radius, mTextPaint); in drawCircle()