TextView轉化Bitmap

  1. TextView view= new TextView(this);this

  2. view.setDrawingCacheEnabled(true);  spa

  3. view.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));   get

  4. view.layout(00, view.getMeasuredWidth(), view.getMeasuredHeight());  it

  5. Bitmap bitmap = view.getDrawingCache();map

相關文章
相關標籤/搜索