更新时间:2022-01-11 21:18:04
您可以尝试
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
在活动的 onCreate()
中或使用
android:keepScreenOn="true"
在您的活动布局中.有关详细信息,请参见此培训材料.
in your activity's layout. See this training material for details.