0

Is any way to blur background when fragment show?
every ways I was tried.
When I called getForeground in:

(container.getForeground().setAlpha(5))..

it is show to me ERROR under (getForeground)

(Must API >=23)

and my application minSdkVersion = 14

Any way to implement method or class to blur background when sdk < 23 or when sdk = 14?

ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96

1 Answers1

0

You can try using getForeground() method within FrameLayout:

container = (FrameLayout) findViewById( R.id.container);

container.getForeground().setAlpha(5); // 0 (opaque) -> 255 (invisible)

Or using View.setAlpha(float):

your_view_name.setAlpha(0.5); // 0 (transparent) -> 1 (opaque)
ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96