此要加入到setContentview(R.layout.xx)前面。

this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

相关文章:

  • 2022-02-20
  • 2022-12-23
  • 2022-01-22
  • 2021-07-13
  • 2022-12-23
  • 2021-05-17
猜你喜欢
  • 2022-12-23
  • 2022-02-14
  • 2022-12-23
  • 2021-06-16
  • 2022-12-23
  • 2021-04-15
  • 2021-06-23
相关资源
相似解决方案