Apply custom effects on view backgrounds

Overview

View Filters

Android Arsenal 

CircleCI

At the beginning the only purpose was to blur all layers below. Now you can do more :

  • Blur background views easily
  • Create custom filters and apply them to views backgrounds

Screenshot

Usage

First add jitpack to your projects build.gradle file

allprojects {
   	repositories {
   		...
   		maven { url "https://jitpack.io" }
   	}
}

Then add the dependency in modules build.gradle file

dependencies {
	  compile 'com.github.mirrajabi:view-effects:e355a1bac4'
 }

Just do the normal ui stuff

<RelativeLayout
     android:layout_width="match_parent" 
     android:layout_height="match_parent"
     android:id="@+id/root_view">
     <View
         android:layout_width="match_parent"
         android:layout_height="100dp"
         android:layout_marginTop="100dp"
         android:layout_marginLeft="20dp"
         android:layout_marginRight="10dp"
         android:id="@+id/my_view"/>
</RelativeLayout>

Then in your code :

ViewFilter.getInstance(this)
          //Use blur effect or implement your custom IRenderer
          .setRenderer(new BlurRenderer(16)) 
          .applyFilterOnView(findViewById(R.id.my_view),
                            findViewById(R.id.root_view));

You can also implement your own IRenderer and use it as the renderer. in some situations you might want the view background to handle it yourself

ViewFilter.getInstance(this)
          .getFilteredBackgroundOfView(findViewById(R.id.my_view),
                                       findViewById(R.id.root_view));
Any contributions are welcome
About me
My Website
You might also like...
Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling Scale Image View, Fresco, Glide, and Picasso. Even with gif and webp support! 🍻
Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling Scale Image View, Fresco, Glide, and Picasso. Even with gif and webp support! 🍻

BigImageViewer Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling

This library uses OpenGL Shaders to apply effects on Videos at Runtime
This library uses OpenGL Shaders to apply effects on Videos at Runtime

VidEffects This is an Android library which can be used to apply different Filters/Effects on videos. It uses vertexShaders and fragmentShaders to app

πŸš€πŸ§¨πŸ“ Series of Tutorials to learn about Jetpack Compose with subjects Material Widgets, Layout, SubcomposeLayout, custom layouts, State, custom rememberable, recomposition, LaunchedEffect, side-effects, Gesture, Animation,  Navigation, Canvas, UIs like whatsapp and others. This is a very simple library for Android that allows you to stick an header to a scrollable view and easily apply animation to it
This is a very simple library for Android that allows you to stick an header to a scrollable view and easily apply animation to it

StikkyHeader This is a very simple library for Android that allows you to stick an header to a ListView and easily apply animation to it Usage To use

How to apply meaningful and delightful motion in a sample Android app
How to apply meaningful and delightful motion in a sample Android app

Applying meaningful motion on Android How to apply meaningful and delightful motion in a sample Android app Read the complete post at https://medium.c

[] Apply background tinting to the Android system UI when using KitKat translucent modes
[] Apply background tinting to the Android system UI when using KitKat translucent modes

Android System Bar Tint Apply background tinting to the Android system UI when using KitKat translucent modes. Android 4.4 (KitKat) introduced translu

How to apply meaningful and delightful motion in a sample Android app
How to apply meaningful and delightful motion in a sample Android app

Applying meaningful motion on Android How to apply meaningful and delightful motion in a sample Android app Read the complete post at https://medium.c

How to apply meaningful and delightful motion in a sample Android app
How to apply meaningful and delightful motion in a sample Android app

Applying meaningful motion on Android How to apply meaningful and delightful motion in a sample Android app Read the complete post at https://medium.c

MVVM Redux is a lightweight lib to help you apply the redux concepts in your project based in MVVM.

MVVM Redux is a lightweight lib to help you apply the redux concepts in your project based in MVVM.

load-the-image Apply to compose-jb(desktop), Used to load network and local pictures.

load-the-image load-the-image Apply to compose-jb(desktop), Used to load network and local pictures. πŸš€ Under construction It may change incompatibly

Custom Tabs with Material Design effects
Custom Tabs with Material Design effects

MaterialTabs Custom Tabs with Material Design animations for pre-Lollipop devices       Download example apk It requires 14+ API and android support v

Custom Tabs with Material Design effects
Custom Tabs with Material Design effects

MaterialTabs Custom Tabs with Material Design animations for pre-Lollipop devices       Download example apk It requires 14+ API and android support v

A cool Open Source CoverFlow view for Android with several fancy effects.
A cool Open Source CoverFlow view for Android with several fancy effects.

FancyCoverFlow THIS PROJECT IS NO LONGER MAINTAINED! What is FancyCoverFlow? FancyCoverFlow is a flexible Android widget providing out of the box view

Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.
Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.

Android Week View Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling. Fea

Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.
Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.

Android Week View Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling. Fea

Custom View classes for TextView, EditText & Buttons - to set custom fonts
Custom View classes for TextView, EditText & Buttons - to set custom fonts

CustomFontView Custom font classes for TextView, EditText & Buttons How to integrate the library in your app? Gradle Dependecy dependencies {

StartPointSeekBar is a custom view for the Android platform that makes it possible to have a SeekBar to have custom start point.
StartPointSeekBar is a custom view for the Android platform that makes it possible to have a SeekBar to have custom start point.

Forked/Inspired from https://code.google.com/p/range-seek-bar/ by [email protected] This solves the problem as described in http://

PagedGrid - Custom android view composed by multiple page grids with custom content and layout
PagedGrid - Custom android view composed by multiple page grids with custom content and layout

PagedGrid A PagedGrid is a ViewPager which pages are GridLayout with equal distributed rows and columns. This project is an Android library, written i

Custom-view-animated-file-downloader - Custom Views, Animations, Broadcast Receivers, Notifications
Custom-view-animated-file-downloader - Custom Views, Animations, Broadcast Receivers, Notifications

Downloader App Custom views , Drawing with Canvas, Animations (with motionlayout

Comments
  • Jitpack support failure

    Jitpack support failure

    Need help here. Jitpack build error log:

    Start: Mon Sep 19 14:21:05 UTC 2016
    Git:
    1.0
    commit 04b4aec4674216b1388aea73fd9edf009bee7658
    Author: Mohammad Mirrajabi 
    Date:   Mon Sep 19 18:45:33 2016 +0430
    
        trying to fix jitpack support
    
    submodule status:
    
    Run gradle build
    Gradle build script
    
    ERROR: Gradle wrapper not found. Please add. Using default gradle to build.
    
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    
    ------------------------------------------------------------
    Gradle 2.7
    ------------------------------------------------------------
    
    Build time:   2015-09-14 07:26:16 UTC
    Build number: none
    Revision:     c41505168da69fb0650f4e31c9e01b50ffc97893
    
    Groovy:       2.3.10
    Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
    JVM:          1.8.0_101 (Oracle Corporation 25.101-b13)
    OS:           Linux 3.14.32-xxxx-grs-ipv6-64 amd64
    
    Getting a list of gradle tasks
    0m0.712s
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    
    WARNING:
    Gradle 'install' task not found. Please add the 'maven' or 'android-maven' plugin.
    See the documentation and examples: https://jitpack.io/docs/
    
    Found android library build file in library
    Running: gradle clean -Pgroup=com.github.mirrajabi -Pversion=1.0 install
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    Download https://jitpack.io/com/github/dcendents/android-maven-gradle-plugin/1.3/android-maven-gradle-plugin-1.3.pom
    Download https://jitpack.io/com/github/dcendents/android-maven-gradle-plugin/1.3/android-maven-gradle-plugin-1.3.jar
    Gradle version Gradle 2.7
    
    BUILD FAILED
    
    Total time: 2.145 secs
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Task 'install' not found in root project 'build'.
    
    * Try:
    Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    Gradle exit code 1
    EXIT_CODE=1
    2016-09-19T14:21:24.546024253Z
    Exit code: 1
    No build artifacts found```
    
    opened by mirrajabi 0
  • Fatal exception

    Fatal exception

    java.lang.IllegalArgumentException: x must be >= 0
                                                                                   at android.graphics.Bitmap.checkXYSign(Bitmap.java:364)
                                                                                   at android.graphics.Bitmap.createBitmap(Bitmap.java:669)
                                                                                   at android.graphics.Bitmap.createBitmap(Bitmap.java:639)
                                                                                   at ir.mirrajabi.viewfilter.core.ViewFilter.getFilteredBackgroundOfView(ViewFilter.java:50)
                                                                                   at ir.mirrajabi.viewfilter.core.ViewFilter$1.run(ViewFilter.java:39)
                                                                                   at android.os.Handler.handleCallback(Handler.java:739)
                                                                                   at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                   at android.os.Looper.loop(Looper.java:135)
                                                                                   at android.app.ActivityThread.main(ActivityThread.java:5281)
                                                                                   at java.lang.reflect.Method.invoke(Native Method)
                                                                                   at java.lang.reflect.Method.invoke(Method.java:372)
                                                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
                                                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
    
    
    bug 
    opened by Ornolfr 1
Owner
Mad Mirrajabi
Awesome developer!
Mad Mirrajabi
Custom view for circular images in Android while maintaining the best draw performance

CircularImageView Custom view for circular images in Android while maintaining the best draw performance Usage To make a circular ImageView, add this

Pkmmte Xeleon 1.2k Dec 28, 2022
RasmView - an Android drawing view; it provides a view that allows users to draw on top of a bitmap.

RasmView RasmView is an Android drawing library; it provides a view that allows users to draw on top of a bitmap. Demo https://www.youtube.com/watch?v

Raed Mughaus 39 Dec 23, 2022
Custom shaped android imageview components

Shape Image View Provides a set of custom shaped android imageview components, and a framework to define more shapes. Implements both shader and bitma

Siyamed SINIR 2.6k Mar 29, 2021
Custom ImageView for moving image around the screen (Android)

MovingImageView Create a custom ImageView for moving image around the screen. Usage To use MovingImageView, add the module into your project and start

Albert Grobas 819 Nov 18, 2022
Custom ImageView for android with polygon shape (Android)

PolygonImageView Create a custom ImageView with polygonal forms. Usage To use PolygonImageView, add the module into your project and start to build xm

Albert Grobas 531 Dec 25, 2022
Custom ImageView to generate captcha image.

CaptchaImageView Custom ImageView to generate captcha image. Add CaptchaImageView to your layout <test.jinesh.captchaimageviewlib.CaptchaImageView

Jinesh Francis 610 Oct 18, 2022
Android library (AAR). Highly configurable, easily extendable deep zoom view for displaying huge images without loss of detail. Perfect for photo galleries, maps, building plans etc.

Subsampling Scale Image View A custom image view for Android, designed for photo galleries and displaying huge images (e.g. maps and building plans) w

null 7.4k Jan 8, 2023
Android View widget for displaying GIF animations.

gif-movie-view Android View widget for displaying GIF animations. To show animated GIF in your application just add GifMovieView into your layout.

Sergey Bakhtiarov 459 Nov 10, 2022
Flickable ImageView for Android. It's like a view of twitter's detail image.

FlickableView Flickable ImageView for Android. It's like a view of twitter's detail image. It's possible that other views animate with FlickableView.

goka 153 Nov 14, 2022