view-effects

Apply custom effects on view backgrounds

Github星跟蹤圖

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

主要指標

概覽
名稱與所有者mirrajabi/view-effects
主編程語言Java
編程語言Java (語言數: 1)
平台
許可證Other
所有者活动
創建於2016-09-13 00:16:38
推送於2017-05-25 17:42:15
最后一次提交2017-05-25 22:12:15
發布數1
最新版本名稱1.0 (發布於 )
第一版名稱1.0 (發布於 )
用户参与
星數178
關注者數4
派生數8
提交數44
已啟用問題?
問題數4
打開的問題數1
拉請求數0
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?