Closed SluggedGerm2 closed 7 years ago
This approach worked for me:
container.getViewTreeObserver().addOnGlobalLayoutListener( new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
setupBlurEffect();
container.getViewTreeObserver().removeOnGlobalLayoutListener( this );
}
} );
Thanks, it work fine :)
It crash using it into onCreate. I solved using a hendler like final Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { //Do something after 1000ms Blurry.with(getApplicationContext()).capture(m_Cover).into((ImageView) findViewById(R.id.dash_imageView_cover_to_blurry)); } }, 150);
Are there any solution to have blur effect without delay?