public static Bitmap getCapture() { // TODO Auto-generated method stub if (mCaptureInside) { ((TBTNaviDemoMapView) mActivity).createScreenShotMessage(); mCaptureClerk.getCaptureProduct(); } else { captureImage(false); } return mCapture; }
public static void captureImage(boolean inside) { // TODO Auto-generated method stub if (mActivity == null) return; View v = mActivity.getWindow().getDecorView(); int width = v.getWidth(); int height = v.getHeight(); if (width <= 0 || height <= 0) return; Rect vRect = new Rect(); v.getWindowVisibleDisplayFrame(vRect); mCapture = Utils.createPngScreenshot(v, v.getWidth(), v.getHeight() - vRect.top, vRect.top); drawDialog(); drawToast(v, vRect); drawMenu(v, vRect); if (inside) { mCaptureClerk.setCaptureProduct(mCapture); } }