W
W
webdevium2016-06-01 13:53:08
Java
webdevium, 2016-06-01 13:53:08

How to programmatically take a screenshot of the entire layout in android?

You need to programmatically get a screenshot of the entire layout, and not just the visible part of the window

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Perelygin, 2016-06-01
@orcDamnar

View v1 = getWindow().getDecorView().getRootView();
v1.setDrawingCacheEnabled(true);
Bitmap bitmap = Bitmap.createBitmap(v1.getDrawingCache());
v1.setDrawingCacheEnabled(false);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question