faradaj / BlurBehind

[DEPRECATED] Easily have blurred and transparent background effect on your Android views.
514 stars 109 forks source link

Bitmap not update #3

Open jsdevjournal opened 9 years ago

jsdevjournal commented 9 years ago

Hi, your library is awesome but i got problem.

the bitmap is not update after first time new activity launched.

eg. First time activity launched, background image set correctly. But after that (2nd, 3rd and so on... ) background image is the same as first one.

I've look into library and try to play with your decorView

        decorView = activity.getWindow().getDecorView();
        decorView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_LOW);
        decorView.setDrawingCacheEnabled(true);
        decorView.buildDrawingCache();
        image = Bitmap.createBitmap(decorView.getDrawingCache());
        decorView.destroyDrawingCache();
        decorView.setDrawingCacheEnabled(false);

no luck...

Do you know how to fix this?

By the way, I forgot to mention that the i use recyclerview for the original activity. Is this related? Is it a problem with recyclerview?

faradaj commented 9 years ago

Hi, You should invoke execute() again if you want cached background to be updated. It seems like you just call setBackground().

(Sorry for late response by the way. :)

jsdevjournal commented 9 years ago

Hi, i have found the problem. The actual problem cause by SwipeRefreshLayout. After the first swipe refresh activity.getWindow().getDecorView() with RecylerView in the background never update again.

johngamarra commented 8 years ago

Hi @durunvo did you manage to solve this issue?