androidandroid-windowmanagerandroid-layoutparamsandroid-window

Using FLAG_NOT_TOUCHABLE, gives Not Responding error


Is there any way to remove that error?

I am using FLAG_NOT_TOUCHABLE in my activity, but when I touch the screen it appear not responding error...

WindowManager.LayoutParams params = getWindow().getAttributes(); 
params.flags |= LayoutParams.FLAG_NOT_TOUCHABLE;
params.screenBrightness = (float) 0.0039999; 
getWindow().setAttributes(params);

Solution

  • I think what you mean by "that error" and "not responding error" is the Activity Not Responding error or ANR. At any rate, Dianne Hackborn, an Android Framework engineer, address this exact problem on a Google Groups page here.