Keep the screen awake throughout my activity

后端 未结 5 1181
说谎
说谎 2020-12-04 21:03

I have three activities in my app. I want to keep the screen awake when it is in the second activity. The screen should not go off in my second activity unless the \"lock\"

5条回答
  •  感动是毒
    2020-12-04 21:31

    I find this solution much easier:

     // Add this line
    

    Just add this to your activity layout XML.

提交回复
热议问题