80,360
社区成员
发帖
与我相关
我的任务
分享
private Bitmap buildUpdate(String str) {
Bitmap myBitmap = Bitmap.createBitmap(500, 300, Bitmap.Config.ALPHA_8);
Canvas myCanvas = new Canvas(myBitmap);
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setSubpixelText(true);
paint.setTypeface(face);
paint.setStyle(Paint.Style.STROKE);
paint.setColor(Color.DKGRAY);
paint.setStrokeWidth(2);
paint.setTextSize(150);
myCanvas.drawText(str, 70, 70, paint);
return myBitmap;
}
<com.mobsandgeeks.ui.TypefaceTextView
geekui:customTypeface="fonts/thin.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="13:57"
android:textSize="60dp" />