How to blur imageview in android

后端 未结 10 2009
南笙
南笙 2020-12-05 10:54

I have an imageview and i set Image Resources programmatically like this:

int resourceId = getResources().getIdentifier(\"imagename\", \"drawable\", \"mypack         


        
10条回答
  •  忘掉有多难
    2020-12-05 11:54

    You can use glide transformations https://github.com/wasabeef/glide-transformations you can blur the image with one line of code

    Glide.with(this).load(R.drawable.demo)
        .bitmapTransform(new BlurTransformation(context))
        .into((ImageView) findViewById(R.id.image));
    

提交回复
热议问题