Reputation: 775
How to remove the title bar that is showing for a second or so at the start of the application in phonegap build? I tried fullscreen as showed in Phonegap remove title bar at start and its working, the app is full screen but the title bar stil shows up for a second or so at the start of the app. When buildin locally I can remove the title bar form manifest.xml with the command android:theme="@android:style/Theme.NoTitleBar">
How can I completely remove the title bar from phonegap build?
I solved it by adding these lines to the config.xml
<gap:config-file platform="android" parent="/manifest">
<supports-screens
android:xlargeScreens="false"
android:largeScreens="false"
android:smallScreens="false" />
<application android:theme="@android:style/Theme.NoTitleBar" >
<activity android:theme="@android:style/Theme.NoTitleBar.Fullscreen" ></activity>
</application>
</gap:config-file>
Upvotes: 5
Views: 4881
Reputation: 43
I used robro's code and it worked, but everything on my screen was cut off at the top since I allow the status bar using this setting in my config:
<preference name="fullscreen" value="false" />
I then took out the following:
<activity android:theme="@android:style/Theme.NoTitleBar.Fullscreen" ></activity>
and all looks perfect now.
Upvotes: 0
Reputation: 1800
Alex already provided the solution in the first post. I'd just like to clarify two things:
supports-screens
back to true
So this would be your config.xml:
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
xmlns:android = "http://schemas.android.com/apk/res/android"
id = "com.domain.app"
version = "1.0.0">
...
<gap:config-file platform="android" parent="/manifest">
<supports-screens
android:xlargeScreens="true"
android:largeScreens="true"
android:smallScreens="true" />
<application android:theme="@android:style/Theme.NoTitleBar" >
<activity android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
</application>
</gap:config-file>
</widget>
Hat tip to wildabeast on github.
Upvotes: 9
Reputation: 19
Try adding splashscreens (if you don't have them already) I tried it and you can no longer see the title bar.
Your config.xml needs these for Android:
<icon src="icons/android/ldpi.png" gap:platform="android" gap:density="ldpi" />
<icon src="icons/android/mdpi.png" gap:platform="android" gap:density="mdpi" />
<icon src="icons/android/hdpi.png" gap:platform="android" gap:density="hdpi" />
<icon src="icons/android/xhdpi.png" gap:platform="android" gap:density="xhdpi" />
and then add your images to the src.
Upvotes: -1