CameraKit / blurkit-android

The missing Android blurring library. Fast blur-behind layout that parallels iOS.
MIT License
3.72k stars 309 forks source link

don't support SurfaceView and VideoView #65

Open Xiang0112 opened 5 years ago

Xiang0112 commented 5 years ago

I want to show BlurLayout when the video is playing, but videoView and SurfaceView is not suppported. I see you said it support SurfaceView, please how to use. And I find if FrameLayout's background is black BlurLayout's background is black too

This is my code:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="io.alterac.blurkit.demo.MainActivity">

<SurfaceView
    android:id="@+id/sv"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
<io.alterac.blurkit.BlurLayout 
    xmlns:blurkit="http://schemas.android.com/apk/res-auto"
    android:id="@+id/blurLayout"
    android:layout_width="150dp"
    android:layout_height="150dp"
    android:layout_centerInParent="true"
    blurkit:blk_downscaleFactor="0.25">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:text="BlurKit!"
        android:textColor="@android:color/white" />

</io.alterac.blurkit.BlurLayout>

guru3393 commented 3 years ago

Hey any update on the how to blur the surface view

beiger commented 2 years ago

same problem