Code example for TextPaint

Methods: setStrokeWidth

0
		mStrokePaint.setColor(color);
		invalidate();
	} 
 
	public void setOutlineWidth(float width){
		mStrokePaint.setStrokeWidth(width);
		invalidate();
	} 
 
	private void setStrokePaint(){ 
		mTextPaint = getPaint();
		mStrokePaint = new TextPaint(mTextPaint);
		mStrokePaint.setTypeface(getTypeface());
		mStrokePaint.setStyle(Paint.Style.STROKE);
 
		// TODO make these properties that can be set from XML 
		mStrokePaint.setARGB(255, 0, 0, 0);
		mStrokePaint.setStrokeWidth(4);
	} 
 
Experience pair programming with AI  Get Codota for Java