문제

I making apps for background image blur when open dialog on button click event and its working for api level 8(Gingerbread) and api level 14 (ICS) not background image blur its only dimming background like on light black, what i do, Thanks for in Advance

This is code working on Android 2.3 and 4.0 not working,

    AlertDialog alertDialog = alertDialogBuilder.create();
    WindowManager.LayoutParams lp = alertDialog.getWindow().getAttributes();  
    lp.dimAmount=0.0f;  
    alertDialog.getWindow().setAttributes(lp);  
    alertDialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);  
    alertDialog.show();
도움이 되었습니까?

해결책

FLAG_BLUR_BEHIND was deprecated in API level 14.

Blurring is no longer supported.

As per Dianne Hackborn Android framework engineer

I recommend avoiding this. Back in the G1 days the blur effect could be implemented somewhat efficiently in software. Those days are long past. This is something you should avoid until at some point in the future when it is done on the GPU.

다른 팁

FLAG_BLUR_BEHIND is deprecated at API Level 14 that's why it works on 2.3 and not on 4.0

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top