After upgrading Android to 6.0+ (especially with Android 6.0.1 Marshmallow), some programs keep displaying the message "Screen Overlay Detected", when you try to run them.
Trying disable Screen Overlay from settings, can't always solve the problem. If the problem continues on your device, here are some solutions:
-Disable Screen Overlay from every program, by clicking on "Open Settings" when the message appears. You will see the options menu. Disable all.
-Disable "Side Key Panel" from Note devices.
-Unistall any 3rd party program, like Clean Master,Trash Cleaner, DU Speed Booster/Cache Cleaner etc. These program are not needed at all and causing problem to your device. My problem caused by Clean Master and solved after i removed it.