• Stars
    star
    178
  • Rank 214,989 (Top 5 %)
  • Language
    Java
  • License
    Other
  • Created about 8 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Apply custom effects on view backgrounds

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

More Repositories

1

search-dialog

An easy to use, yet very customizable search dialog
Java
514
star
2

okhttp-json-mock

Mock your data for Okhttp and Retrofit in json format in just a few moves
Java
245
star
3

duration-humanizer

361000 becomes "6 minutes, 1 second"
Kotlin
61
star
4

kotlet

Just another Kotlin sample Android application which uses MVP architecture, Dagger2, Retrofit + Okhttp, RxJava etc.. plus some docs I've collected
Kotlin
27
star
5

annotation-processor-sample

An annotation processor which implements "Builder pattern" for your java classes.
Java
24
star
6

firebase-chat-sample

A sample app that shows basic usage of Firebase Auth and Database in form of a very simple chat hub app
Java
21
star
7

aider-github-action

Run Aider AI assistant in your Github Workflows!
Shell
14
star
8

aider-github-workflows

Workflows that use aider-github-action
10
star
9

sdxl-turbo-mac-mps

Run Stable Diffusion XL Turbo on Mac M1/M2
Python
9
star
10

kotlin-preferences-extensions

A set of RxJava2 Extensions to get/set values of SharedPreferences in a super simple way
Kotlin
9
star
11

een-een-twee

πŸš‘ πŸš“ πŸš’ To become more paranoid, or not to become more paranoid, that is the question.
TypeScript
3
star
12

cf-render

✨ Convert your CloudFormation and CDK code to visuals! ✨
TypeScript
3
star
13

electric-field-demonstration

Electric field demonstration in Unity3D
C#
2
star
14

simple-bank-system

This was a simple stupid university project. The goal was to make a simple bank deposit/withdraw system in C#
C#
1
star
15

aider-github-workflows-test

A repo to test aider-github-workflows on
TypeScript
1
star