Show black preview screen in task manager on ICS

≯℡__Kan透↙ 提交于 2019-11-30 05:28:47

问题


I want to show a black screen in the task manager preview under Ice Cream Sandwich, like the German 'finanzstatus' app does. It would be nice if someone could point me in the right direction.


回答1:


Using FLAG_SECURE will block your app from screenshots, including the recent tasks list:

public class FlagSecureTestActivity extends Activity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    getWindow().setFlags(LayoutParams.FLAG_SECURE,
                         LayoutParams.FLAG_SECURE);

    setContentView(R.layout.main);
  }
}


来源:https://stackoverflow.com/questions/9984083/show-black-preview-screen-in-task-manager-on-ics

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!