I wonder which is better in performance and behavior between the following ways in achieving:
Full Screen.
Screen On.
or both is the same
First:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
OR
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN |
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
MAYBE this is easy question but I'm still learning android development,
Any help will be appreciated,
Thanks.
I don't think both scenarios affect performance a lot, but in modern developing environment we prefer simplicity of coding which directly seen in
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN |
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
so definitely I vote for that