0

I have a picture and I want the background to be a blur from the main image how can i do this? It's like this: Image

And I tried using setAlpha but it just darkened the image.

Thank !

  • First result for "android blur background". https://stackoverflow.com/questions/31641973/how-to-blur-background-images-in-android You could set blur as background, and your image as sourceDrawable("src" in xml) if you wanna do it with the same ImageView. – Eugene Troyanskii Jan 11 '18 at 17:34

1 Answers1

0

You can set the alpha property of the ImageView something like this:

android:alpha="0.3" //set value between 0-1 of your choice

or by your code:

ImageView imageView = findViewById(R.id.yourimageViewID);
imageView.setAlpha(0.3f);
Salman Anjum
  • 333
  • 3
  • 7