Created
September 8, 2020 21:08
-
-
Save oluwabajio/104b69f8b9a56958d83ee3700403c8fd to your computer and use it in GitHub Desktop.
Capture Full Screen Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Bitmap captureScreen() { | |
View v = getWindow().getDecorView().getRootView(); | |
v.setDrawingCacheEnabled(true); | |
Bitmap bmp = Bitmap.createBitmap(v.getDrawingCache()); | |
v.setDrawingCacheEnabled(false); | |
return bmp; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment