[[1]:http://i.stack.imgur.com/Lnz0U.png!][1]I已经编写了将edittext转换为图像的代码,但我只想要在edittext中输入的文本,只有文本转换为图像(不是所有的edittext)。请帮帮我
Typeface font = Typeface.createFromAsset(getAssets(), "barbatrick.ttf");
et.setTypeface(font);
et.setCursorVisible(false);
et.buildDrawingCache();
Bitmap bmp = Bitmap.createBitmap(et.getDrawingCache());
ImageView iv=(ImageView)findViewById(R.id.imageView1);
iv.setImageBitmap(bmp);
答案 0 :(得分:0)
public Bitmap getViewImage(View view) {
view.buildDrawingCache();
return view.getDrawingCache();
}