How to blur background images in Android

前端 未结 10 2141
借酒劲吻你
借酒劲吻你 2020-11-30 22:12

What is the best way to blur background images like the image below? I saw some code and libraries but their are a couple of years old or like BlurBehind library, but it doe

10条回答
  •  被撕碎了的回忆
    2020-11-30 22:44

    The easiest way to do that is use a library. Take a look at this one: https://github.com/wasabeef/Blurry

    With the library you only need to do this:

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

提交回复
热议问题