android之Blurry,图片模糊

来源:互联网 发布:gmp系统网络的搭建 编辑:程序博客网 时间:2024/05/16 11:52

Screenshot


How do I use it?

Setup

Dependencies
dependencies {    compile 'jp.wasabeef:blurry:2.1.1'}

Functions

Overlay

Parent must be ViewGroup

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

Into

// from ViewBlurry.with(context).capture(view).into(imageView);
// from Bitmap Blurry.with(context).from(bitmap).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);

Requirements

Android 3.+