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

Overview

##[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.
Comments
  • Can't add the library in gradle

    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

    opened by namooplus 4
  • Use RenderScript compat library

    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
    }
    
    opened by mradzinski 2
  • You're just kidding me!!!!Waste things!!!!

    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!!

    opened by tangxianqiang 0
  • blurbehind not working for fragment

    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

    opened by gsujathap 1
  • Blur also takes screen shot of soft navigation bar

    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

    opened by harunbulutlar 1
  • Running an intent from a notification

    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,

    opened by hatpick 1
Releases(v1.1)
Owner
Gokberk Ergun
Gokberk Ergun
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

null 3.6k Dec 29, 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

null 859 Dec 30, 2022
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

Manabu S. 755 Dec 29, 2022
ShimmerTextView is a simple library to integrate shimmer effect in your TextView.

ShimmerTextView ShimmerTextView is a simple library to integrate shimmer effect in your TextView. Key features Set a base color in ShimmerTextView. Se

MindInventory 22 Sep 7, 2022
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

Cleveroad 127 Dec 31, 2022
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.

Lopez Mikhael 583 Dec 9, 2022
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

Andrii 859 Nov 10, 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

null 85 Dec 15, 2022
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

Amr Hesham 63 Nov 24, 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

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

Burhanuddin Rashid 1k Jan 1, 2023
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

Enrique López Mañas 3.6k Dec 29, 2022
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+

Bo 2.8k Dec 21, 2022
Beautiful and smooth custom loading views

mkloader Beautiful and smooth custom loading views Usage <com.tuyenmonkey.mkloader.MKLoader android:layout_width="wrap_content" an

Tuyen Nguyen 1.4k Nov 22, 2022
💳 A quick and easy flip view through which you can create views with two sides like credit cards, poker cards etc.

The article on how this library was created is now published. You can read it on this link here. →. ?? EasyFlipView Built with ❤︎ by Wajahat Karim and

Wajahat Karim 1.3k Dec 14, 2022
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

Flávio Faria 2.7k Jan 2, 2023
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

Robin Chutaux 4.9k Dec 30, 2022
: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

Jaewoong Eum 763 Dec 29, 2022
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

Facebook 5.1k Dec 26, 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

Supercharge 2.5k Jan 4, 2023