RealtimeBlurView icon indicating copy to clipboard operation
RealtimeBlurView copied to clipboard

Strange frames around the edges of the blur

Open TheNetos opened this issue 6 years ago • 5 comments

I try to blur the background, and almost constantly around the edges of the blur, I see the effect of the "frame" screenshot_1529657143 Sometimes when Activity is launched, this effect does not appear screenshot_1529657130

Tested on: Pixel 2 emulator (API 22), Samsung SM-A300F

Code:

` <FrameLayout android:id="@+id/drawer_container" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior">

    <android.support.v4.view.ViewPager
        android:id="@+id/viewPager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="8dp"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">
    </android.support.v4.view.ViewPager>
</FrameLayout>

<com.github.mmin18.widget.RealtimeBlurView
    android:id="@+id/blurView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    app:realtimeBlurRadius="4dp"
    app:realtimeOverlayColor="@color/colorOverlayGrey" />`

TheNetos avatar Jun 22 '18 09:06 TheNetos

Does your activity has a white background?

mmin18 avatar Jun 22 '18 09:06 mmin18

No, background color set as #323643

TheNetos avatar Jun 22 '18 09:06 TheNetos

Here's how it looks in the dynamics of work blur_bug

TheNetos avatar Jun 22 '18 10:06 TheNetos

Sorry I couldn't reproduce the issue by using a ViewPager. Could you provide more info.

mmin18 avatar Jun 24 '18 02:06 mmin18

Try modifying the code in the section that draws decorview to the Bitmap: View contentView = decor.findViewById(android.R.id.content); if(contentView.getBackground() != null){ contentView.getBackground().draw(mBlurringCanvas); } contentView.draw(mBlurringCanvas);

NicoTic avatar Nov 14 '23 02:11 NicoTic