1

I need to put blurred background image on Navigation header view in Android API<14. I read lot of documentation on ScriptIntrinsicBlur but he has been added on API<17.

I know getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND) exist but it seems to be use on windows, not on Bitmap Image.

Do you know how transform my Bitmap image in blurred Bitmap or Drawable on API<14 ?

Thanks !

EDIT :

- Step 1: Add to build.gradle(Module: app):

`Android{
    [...]
    dependencies{
        [...]
        renderscriptTargetApi 14
        renderscriptSupportModeEnabled true
    }
}`

- Step 2 import android.support.v8.renderscript.*;

It Work ! ScriptIntrinsicBlur is now ready to use. Thanks to Nikola Despotoski For his help.

E. Spiroux
  • 430
  • 6
  • 15
  • Thanks for the info! In your code sample, the `\`Android` should be `android` , and `dependencies` should be `defaultConfig`, then it works as intended. – gregn3 Sep 13 '17 at 16:22

2 Answers2

3

You can use ScriptIntrinsicBlur from the v8 support library.

Nikola Despotoski
  • 49,966
  • 15
  • 119
  • 148