Do you want your application to be started in full screen mode without android title bar ?
Here is your answer.
In this post I'll explain you the code and generic procedure to start application in full screen mode.
Please download and check following application as reference for the features mentioned in this post.
Google Play : https://play.google.com/store/apps/details?id=com.magicalwizard
YouTube: http://www.youtube.com/watch?v=ul4g229B2JQYou need to call requestWindowFeature() function of the context object and pass "Window.FEATURE_NO_TITLE" as argument to set "no title" feature, turning off the title at the top of the screen.
You also need to call setflag() function for the current window and pass "WindowManager.LayoutParams.FLAG_FULLSCREEN" as argument to enable the full screen feature for current window.
It's good practice to write the full screen code in some generic class which can be used across the activities as you have to call it from every activity in your application to start all application activities in full screen mode.
Actual code implementation will be as follows:
Note: You need to call setFullScreen() function from each activity before setContentView() function.
Magical Wizard game in Action:
Hi, I've a problem:
ReplyDeletewhen coming back from lock screen the status bar on the top appears and overlap the first part of the screen...
How do you solve this problem?
Personally, I think the title bar is kind of simple looking and usually not necessary. Usually you know what app you are currently using, and there is not much space to make the title bar display anything fascinating.
ReplyDelete