How to blur a view or layout in android?

强颜欢笑 提交于 2019-12-01 05:43:18

Try this Library its nice and simple to use.

Setup

Dependencies

dependencies {
compile 'jp.wasabeef:blurry:2.0.3'
}

Functions

Overlay

Parent must be ViewGroup

Blurry.with(context).radius(25).sampling(2).onto((ViewGroup) rootView);

Into

Blurry.with(context).capture(view).into(imageView);

Blur Options

  • Radius
  • Down Sampling
  • Color Filter
  • Asynchronous Support
  • Animation (Overlay Only)

Blurry.with(context)
.radius(10)
.sampling(8)
.color(Color.argb(66, 255, 255, 0))
.async()
.animate(500)
.onto(rootView);

OutPut:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!