把字符串转化为drawable:

把字符串转化为drawable:

public Drawable TextToDrawable(int id) {
		Bitmap bitmap = Bitmap.createBitmap(200, 250, Config.ARGB_8888);
		Canvas canvas = new Canvas(bitmap);
		Paint paint = new Paint();
		paint.setTextSize(65);
		paint.setTextAlign(Align.LEFT);
		paint.setColor(Color.GRAY);
		String s = getResources().getString(id);
		FontMetrics fm = paint.getFontMetrics();
		canvas.drawText(s, 0, 145 + fm.top - fm.ascent, paint);