public void getScreenShot(Rect shotRect) {
View view = context.getWindow().getDecorView();
view.setDrawingCacheEnabled(true);
view.buildDrawingCache();
bitmap = view.getDrawingCache();
bitmap = Bitmap.createBitmap(bitmap, shotRect.left, shotRect.top,
shotRect.right - shotRect.left, shotRect.bottom - shotRect.top);
view.setDrawingCacheEnabled(false);
}