Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tuesda's full-sized avatar
🚗
Living in the moment

ZhangLei tuesda

🚗
Living in the moment
View GitHub Profile
public static Bitmap getScreenshotFromRecyclerView(RecyclerView view) {
RecyclerView.Adapter adapter = view.getAdapter();
Bitmap bigBitmap = null;
if (adapter != null) {
int size = adapter.getItemCount();
int height = 0;
Paint paint = new Paint();
int iHeight = 0;
final int maxMemory = (int) Runtime.getRuntime().maxMemory();