Question

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);
Was it helpful?

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.

OTHER TIPS

I worked around this issue by creating a transparent view that overlays the entire window and captures onClick events. That way the app is "responsive" and no ANR is triggered, but the user can't actually click any buttons on the screen.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top