浏览代码

Merge pull request #222 from EternalChildren/master

fix the bug that deposit the wrong bitmap to buffer
Gaëtan Renaudeau 4 年前
父节点
当前提交
9b84b341ba
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java

+ 1
- 1
android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java 查看文件

@@ -478,7 +478,7 @@ public class ViewShot implements UIBlock {
478 478
     private static Bitmap getBitmapForScreenshot(final int width, final int height) {
479 479
         synchronized (guardBitmaps) {
480 480
             for (final Bitmap bmp : weakBitmaps) {
481
-                if (bmp.getWidth() >= width && bmp.getHeight() >= height) {
481
+                if (bmp.getWidth() == width && bmp.getHeight() == height) {
482 482
                     weakBitmaps.remove(bmp);
483 483
                     bmp.eraseColor(Color.TRANSPARENT);
484 484
                     return bmp;