I have an activity in which I want to avoid custom touch buttons in time.
I'm doing it:
WindowManager.LayoutParams params = getWindow().getAttributes(); getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_FULLSCREEN); getWindow().setAttributes(params);
It works fine, but when I return to receive touch events with:
WindowManager.LayoutParams params = getWindow().getAttributes(); getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_FULLSCREEN); getWindow().setAttributes(params);
I get all relatives of events for user touches for an insensitive period.
Any idea how to discard these events?
jegumi
source share