Browse Source

0.0.40.beta11

kongzue 3 years ago
parent
commit
01c44b8530

+ 7 - 8
DialogX/src/main/java/com/kongzue/dialogx/util/views/BlurView.java

@@ -360,14 +360,10 @@ public class BlurView extends View {
         if (!useBlur) {
             mRectF.right = getWidth();
             mRectF.bottom = getHeight();
-            canvas.drawRoundRect(mRectF, mRadius, mRadius, cutPaint);
+            overlayPaint.setColor((supportRenderScript && useBlur) ? mOverlayColor : removeAlphaColor(mOverlayColor));
+            canvas.drawRoundRect(mRectF, mRadius, mRadius, overlayPaint);
         } else {
-            if (mIsRendering) {
-                // Quit here, don't draw views above me
-                //throw STOP_EXCEPTION;
-            } else if (RENDERING_COUNT > 0) {
-                // Doesn't support blurview overlap on another blurview
-            } else {
+            if (!mIsRendering && RENDERING_COUNT <= 0) {
                 super.draw(canvas);
             }
         }
@@ -402,10 +398,13 @@ public class BlurView extends View {
             mRectSrc.bottom = blurredBitmap.getHeight();
             blurredBitmap = getRoundedCornerBitmap(blurredBitmap, mRectDst);
             if (blurredBitmap != null) canvas.drawBitmap(blurredBitmap, 0, 0, null);
+        } else {
+            Bitmap overlyBitmap = drawOverlyColor(Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888));
+            if (overlyBitmap != null) canvas.drawBitmap(overlyBitmap, 0, 0, null);
         }
     }
     
-    private Bitmap getRoundedCornerBitmap(Bitmap bitmap,  Rect mRectDst) {
+    private Bitmap getRoundedCornerBitmap(Bitmap bitmap, Rect mRectDst) {
         bitmap = drawOverlyColor(resizeImage(bitmap, mRectDst.width(), mRectDst.height()));
         if (bitmap == null) return null;
         Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);

+ 1 - 1
app/src/main/java/com/kongzue/dialogxdemo/MainActivity.java

@@ -566,7 +566,7 @@ public class MainActivity extends BaseActivity {
         btnShowBreak.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                jump(AppCompatActivityTest.class, new JumpParameter().put("showBreak", true));
+                jump(MainActivity.class, new JumpParameter().put("showBreak", true));
             }
         });
         

+ 1 - 1
gradle.properties

@@ -18,5 +18,5 @@ android.useAndroidX=true
 # Automatically convert third-party libraries to use AndroidX
 android.enableJetifier=true
 
-BUILD_VERSION=0.0.40.beta10
+BUILD_VERSION=0.0.40.beta11
 BUILD_VERSION_INT=39