我试图提取与显示的TextView实例关联的位图,但它总是返回一个空值.我究竟做错了什么?我应该使用textview.draw(canvas)吗?
TextView textview = (TextView) findViewById(R.id.text_title);
textview.setDrawingCacheEnabled(true);
textview.buildDrawingCache();
Bitmap bmp = textview.getDrawingCache();
Run Code Online (Sandbox Code Playgroud)