android prevent screenshot in activity
snippet in kotlin

android prevent screenshot in activity

user5869

import android.view.WindowManager.LayoutParams

override fun onCreate(savedInstanceState: Bundle?) {
	// ...
	window.setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE)
    // ...
}