wasabeef / Blurry

Blurry is an easy blur library for Android
Apache License 2.0
5.57k stars 602 forks source link

Why doesn't it work #93

Open robinhoo2010 opened 5 years ago

robinhoo2010 commented 5 years ago

HI,Why doesn't it work, the code is Blurry.with(this) .radius(10) .sampling(8) .async() .capture(findViewById(R.id.iv_logo)) .into(findViewById(R.id.iv_logo));

zeeshan-mehdi commented 5 years ago

renderscriptTargetApi 28 renderscriptSupportModeEnabled true

add these two lines to your app level build.gradle file like this android{ defaultConfig { applicationId "com.dating.needtodate" minSdkVersion 16 targetSdkVersion 28 versionCode 1 versionName "1.0"

    renderscriptTargetApi 28
    renderscriptSupportModeEnabled true

    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

}

make sure that target sdk version and renderscriptTargetApi version are same

hope it work :)

superdiazzz commented 3 years ago

@zeeshan-mehdi i still have the issue, still showing white space

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
            Blurry.with(this)
                .radius(25)
                .sampling(4)
                .color(Color.argb(66, 255, 255, 0))
                .capture(findViewById(R.id.image_header))
                .getAsync {
                    findViewById<ImageView>(R.id.image_header).setImageDrawable(BitmapDrawable(resources, it))
                }
        }

and i already put the addition script on app build.gradle like this

defaultConfig {
        applicationId "com.skillbaru.apps"
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 10
        versionName "1.0.9"
        multiDexEnabled true

        renderscriptTargetApi 29
        renderscriptSupportModeEnabled true

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"