[] Easily have blurred and transparent background effect on your Android views.

Last update: Jun 17, 2022

##[DEPRECATED]

BlurBehind Build Status

Easily have blurred and transparent background effect on your Android views.

Before API level 14 there was a Window flag called FLAG_BLUR_BEHIND. It was used for "blurring everything behind a window" and is no longer supported by Android.

BlurBehind provides an easy way to have that effect, with customization, for your window without API level restrictions.

Usage

Invoke BlurBehind.getInstance().execute() method with caller Activity and the actual work as a Runnable.

dummyButton.setOnClickListener(new View.OnClickListener() {
	@Override
	public void onClick(View v) {

		BlurBehind.getInstance().execute(MainActivity.this, new OnBlurCompleteListener() {
            @Override
            public void onBlurComplete() {
                Intent intent = new Intent(MainActivity.this, BlurredActivity.class);
                intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);

                startActivity(intent);
            }
        });
	}
});

And use BlurBehind.getInstance().setBackground(Activity a) method on new View, which is an Activity in sample project:

BlurBehind.getInstance().setBackground(this);

You can optionally set alpha and filterColor:

BlurBehind.getInstance()
    .withAlpha(80)
    .withFilterColor(Color.parseColor("#0075c0")) //or Color.RED
    .setBackground(this);

Which will result in this:

Dependency

  • Run gradle install on blur-behind library project.
  • In your build.gradle:
repositories {
    mavenCentral()
    mavenLocal() //Add local m2 repository of yours
}
dependencies {
    compile 'com.faradaj:blur-behind:[LATEST_RELEASE_VERSION]'
}

or

  • In your pom.xml:
<dependency>
  <groupId>com.faradaj</groupId>
  <artifactId>blur-behind</artifactId>
  <version>[LATEST_RELEASE_VERSION]</version>
</dependency>

or you can clone and add blur-behind as a library project to yours.

Credits

License

The MIT License (MIT)

Copyright (c) 2014 Gokberk Ergun

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

GitHub

https://github.com/faradaj/BlurBehind
Comments
  • 1. Can't add the library in gradle

    When I try to add this library like this,

    repositories {
    mavenCentral()
        mavenLocal()
    }
    
    dependencies {
        compile 'com.faradaj:blur-behind:1.1.0'
    }
    

    "Dependency 'com.faradaj:blur-behind:1.1.0' not found"

    How can i solve it? :worried:

    p.s Run 'gradle install' on 'blur-behind' library project. <= What does it mean

    Reviewed by namooplus at 2015-07-25 07:33
  • 2. Use RenderScript compat library

    Why not to use RenderScript compatibility library instead of an algorithm for API's lower than 16 and the regular RenderScript for 16 and up? It's not only more performant for older devices but also reduces the complexity of the Blur class since you don't have to have different blur methods for different API's.

    Enable the RenderScript compat by adding the below to gradle.build file

    defaultConfig {
        renderscriptTargetApi 19
        renderscriptSupportMode true
    }
    
    Reviewed by mradzinski at 2014-10-04 04:06
  • 3. You're just kidding me!!!!Waste things!!!!

    Do you know "FLAG_BLUR_BEHIND"? You know???? You're just implementing a simple demo.However,you made a lib to show your blur! It must not work well on SurfaceView or WebView! Do you dare to have a try?Don't publish an article with a big face!!Don't publish an article with a big face!!Don't publish an article with a big face!!Don't publish an article with a big face!!Don't publish an article with a big face!!

    Reviewed by tangxianqiang at 2017-12-27 11:25
  • 4. blurbehind not working for fragment

    I used your blurbehind to my fragment class but it is not showing any thing Code: BlurBehind.getInstance() .withAlpha(80) .withFilterColor(Color.parseColor("#0075c0")) .setBackground(getActivity()); plz help me out

    Reviewed by gsujathap at 2016-04-05 13:12
  • 5. Blur also takes screen shot of soft navigation bar

    I tried the library, everything works great except I see that image visible in the background also has navigation bar on it which creates the effect of background moving a little bit up

    Reviewed by harunbulutlar at 2015-07-15 20:22
  • 6. Running an intent from a notification

    If I have a main activity called A and I put .execute code inside it to go to another activity B where blurring happens, how can I have the same blurred background if I create activity B from a notification?

    Thanks,

    Reviewed by hatpick at 2015-07-10 09:07
explosive dust effect for views
explosive dust effect for views

ExplosionField explosive dust effect for views Getting started In your build.gradle: dependencies { compile 'tyrantgit:explosionfield:1.0.1' } Ex

Jun 15, 2022
Glass-break effect for views

BrokenView Glass-break effect for views. Demo Download APK Usage Android Studio dependencies { compile 'com.zys:brokenview:1.0.3' } Eclipse Just pu

Jun 17, 2022
EtsyBlur is an Android library that allows developers to easily add a glass-like blur effect implemented in the Etsy app.
EtsyBlur is an Android library that allows developers to easily add a glass-like blur effect implemented in the  Etsy app.

EtsyBlur EtsyBlur is an Android library that allows developers to easily add a glass-like blur effect implemented in the past Etsy app. Try out the sa

Jun 7, 2022
User onboarding library with smooth animation of objects and background colors
User onboarding library with smooth animation of objects and background colors

SlidingTutorial Cleveroad introduces Sliding Tutorial Library for Flutter Hey guys, hope you haven’t started developing a tutorial for your Flutter ap

Apr 12, 2022
Simple way to animate your views on Android with Rx 🚀
Simple way to animate your views on Android with Rx 🚀

This is an Android library to make a simple way to animate your views on Android with Rx.

Jun 15, 2022
Location tracking & geofencing the easy way. Supports background, killed app, rebooted device different update intervals.

Geofencer Convience library to receive user location updates and geofence events with minimal effort. Features: supports Android-Q receive updates on

Jun 10, 2022
Extended Android Tab Layout with animated indicators that have continuous feedback.
Extended Android Tab Layout with animated indicators that have continuous feedback.

Dachshund Tab Layout Introduction Boosted Android Tab Layout with custom animated indicators including "Dachshund" animation inspired by this. Sample

May 23, 2022
Android Annotation Processor library to generate adapter class easily from your model with a lot of customization
Android Annotation Processor library to generate adapter class easily from your model with a lot of customization

Android Annotation Processing Library to generate your adapters only with Annotations on your model, support working with Kapt and KSP Processors

Jun 12, 2022
Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. The library is based on the code of Mario Klingemann.
Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. The library is based on the code of Mario Klingemann.

Android StackBlur Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. Th

Jun 21, 2022
A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates
A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates

WhatTodo Life can feel overwhelming. But it doesn’t have to. A Simple To-do app design in flutter to keep track of your task on daily basis. You can a

Jun 20, 2022
A component for flip animation on Android, which is similar to the effect in Flipboard iPhone/Android
A component for flip animation on Android, which is similar to the effect in Flipboard iPhone/Android

android-flip Aphid FlipView is a UI component to accomplish the flipping animation like Flipboard does. A pre-built demo APK file for Android OS 2.2+

Jun 24, 2022
Android ImageViews animated by Ken Burns Effect
Android ImageViews animated by Ken Burns Effect

KenBurnsView Android library that provides an extension to ImageView that creates an immersive experience by animating its drawable using the Ken Burn

Jun 16, 2022
Implementation of Ripple effect from Material Design for Android API 9+
Implementation of Ripple effect from Material Design for Android API 9+

RippleEffect ExpandableLayout provides an easy way to create a view called header with an expandable view. Both view are external layout to allow a ma

Jun 7, 2022
:sparkles: An easy way to implement an elastic touch effect for Android.
:sparkles: An easy way to implement an elastic touch effect for Android.

ElasticViews ✨ An easy way to implement an elastic touch effect for Android. Including in your project Gradle Add below codes to your root build.gradl

Jun 18, 2022
An easy, flexible way to add a shimmering effect to any view in an Android app.
An easy, flexible way to add a shimmering effect to any view in an Android app.

Shimmer for Android Shimmer is an Android library that provides an easy way to add a shimmer effect to any view in your Android app. It is useful as a

Jun 25, 2022
Memory efficient shimmering effect for Android applications by Supercharge.

DEPRECATED - ShimmerLayout Attention: This tool is now deprecated. Please switch to Shimmer for Android or any other shimmer effect solution. ShimmerL

Jun 20, 2022
A pager for Android with parallax effect

ParallaxPagerTransformer A pager transformer for Android with parallax effect Installation in your build.gradle file dependencies { // ... com

May 7, 2022
Library provides an easy way to a add shimmer effect in Android Compose project.
Library provides an easy way to a add shimmer effect in Android Compose project.

Add a shimmer effect to the layout in Android Compose

May 15, 2022
"Gooey-Effect" for android-compose

Gooey effect for android-compose "Gooey" is a library made to use "gooey-effect" that exists as a CSS trick in android-compose. Download repositories

May 25, 2022