Tutorial by Examples

Open Android Monitor Tab Click on Screen Capture Button
Open Android Device Monitor ( ie C:<ANDROID_SDK_LOCATION>\tools\monitor.bat) Select your device Click on Screen Capture Button
Example below saves a screenshot on Devices's Internal Storage. adb shell screencap /sdcard/screen.png
If you use Linux (or Windows with Cygwin), you can run: adb shell screencap -p | sed 's/\r$//' > screenshot.png
If you want to take a screenshot of a particular View v, then you can use the following code: Bitmap viewBitmap = Bitmap.createBitmap(v.getWidth(), v.getHeight(), Bitmap.Config.RGB_565); Canvas viewCanvas = new Canvas(viewBitmap); Drawable backgroundDrawable = v.getBackground(); if(backgroundD...

Page 1 of 1