Black edges around the taken screenshot

邮差的信 提交于 2019-11-29 07:58:17

Problem is probably the size of the virtual display.

mDisplay.getSize(size);

may return something different than the real size of the device if your device have a virtual navigation bar (usually swipe from bottom of the screen to display it).

mDisplay.getRealSize(size);

will probably fix your problem with black edges.

Rect rect = image.getCropRect();
bitmap = Bitmap.createBitmap(bitmap, rect.left, rect.top, rect.width(), rect.height());
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!