在“最新应用列表"中隐藏屏幕,但允许截图 [英] Hide screen in 'Recent Apps List', but allow screenshots
本文介绍了在“最新应用列表"中隐藏屏幕,但允许截图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于要显示敏感数据,我主要想在最近使用的应用列表中清空屏幕.为此,解决方案是使用:
I mainly want to blank the screen in the recent apps list due to sensitive data being shown. For this, the solution is to use:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
但这也不允许截图,这是一个问题.
but this also disallows screenshots, which is a problem.
有没有办法在最近的应用列表中显示空白屏幕(或预定义的图像),同时仍然允许截图?
Is there a way to show a blank screen (or a predefined image) in the recent apps list, while still allowing screenshots?
推荐答案
我认为您需要的是:
android:excludeFromRecents="true"
将其放入您的android清单中的<activity>(activity you want to exclude from recents)</activity>
put that in your android manifest inside your <activity>(activity you want to exclude from recents)</activity>
这篇关于在“最新应用列表"中隐藏屏幕,但允许截图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文