List of usage examples for android.view View setDrawingCacheEnabled
@Deprecated public void setDrawingCacheEnabled(boolean enabled)
Enables or disables the drawing cache.
From source file:Main.java
public static Bitmap getBitmapForView(View view) { view.setDrawingCacheEnabled(true); return view.getDrawingCache(); }
From source file:Main.java
public static Bitmap takeScreenShot(View view) { view.setDrawingCacheEnabled(true); view.buildDrawingCache();//from w ww . j a v a2 s . c o m return view.getDrawingCache(); }
From source file:Main.java
public static Bitmap getBitmap(View view) { view.setDrawingCacheEnabled(true); Bitmap bitmap = Bitmap.createBitmap(view.getDrawingCache()); view.setDrawingCacheEnabled(false);//from w ww. j av a2 s. c o m return bitmap; }
From source file:Main.java
public static Bitmap convertViewToBitmap(View view) { view.setDrawingCacheEnabled(true);//buildDrawingCache(); Bitmap bitmap = view.getDrawingCache(); return bitmap; }
From source file:Main.java
public static Bitmap viewToBitmap(View view) { view.setDrawingCacheEnabled(true); view.buildDrawingCache();//from w w w . ja va 2 s.c om Bitmap bm = view.getDrawingCache(); return bm; }
From source file:Main.java
public static Bitmap getBitmapByView(View view) { view.setDrawingCacheEnabled(true); view.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED); view.buildDrawingCache();// w w w . ja v a2s . c o m return view.getDrawingCache(); }
From source file:Main.java
public static Bitmap getDrawingCache(View view) { view.setDrawingCacheEnabled(true); Bitmap bitmap = view.getDrawingCache(); /*view.setDrawingCacheEnabled(false); view.destroyDrawingCache();*/ return bitmap; }
From source file:Main.java
public static Bitmap takeScreenShot(View view) { view.setDrawingCacheEnabled(true); view.buildDrawingCache(true);//from w w w . ja v a2 s . c om Bitmap res = Bitmap.createBitmap(view.getDrawingCache()); view.setDrawingCacheEnabled(false); return res; }
From source file:Main.java
public static Bitmap loadBitmapFromView(View v) { v.setDrawingCacheEnabled(true); v.buildDrawingCache(true);// w ww .ja v a 2s. co m // creates immutable clone Bitmap b = Bitmap.createBitmap(v.getDrawingCache()); v.setDrawingCacheEnabled(false); // clear drawing cache return b; }
From source file:Main.java
public static Bitmap getViewBitmap(View view) { view.setDrawingCacheEnabled(true); Bitmap bitmap = Bitmap.createBitmap(view.getDrawingCache()); view.setDrawingCacheEnabled(false);//from w w w.j av a2 s. co m view.destroyDrawingCache(); return bitmap; }