Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phonegap android application name appears before splash screen

This is my first attempt to create a simple android app using phonegap 1.9.0.

The problem I'm facing is that when I start my app (both using emulator and my android phone) it displays the application name and icon before it proceeds to the splash screen I've set up. It looks like this: http://imgur.com/iZ1i3

How do I make it display the splash screen first? that is, how do I make it not displaying the app name? I don't want that to be shown at all.

Im not sure what you guys need, so here are some of the stuff I have, hope it is enough:

androidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.googlemap.map"
          android:versionCode="1"  
          android:versionName="1.0">

    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="15" />
    <supports-screens 
          android:largeScreens="true" 
          android:normalScreens="true" 
          android:smallScreens="true" 
          android:resizeable="true" 
          android:anyDensity="true" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application android:label="@string/app_name"
        android:icon="@drawable/ic_launcher"
        android:theme="@style/AppTheme"
        android:hardwareAccelerated="true">

        <activity android:label="@string/app_name"
            android:name=".GoogleMap"
            android:configChanges="orientation|keyboardHidden"
            android:multiprocess="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

GoogleMap.java:

package com.googlemap.map;

import android.app.Activity;
import android.os.Bundle;
import org.apache.cordova.*;

public class GoogleMap extends DroidGap {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.setIntegerProperty("splashscreen", R.drawable.splash);
        super.loadUrl("file:///android_asset/www/index.html", 10000);
    }
}
like image 687
Gotcha Avatar asked Jul 04 '12 06:07

Gotcha


1 Answers

Try using this in the AndroidManfiest:

android:theme="@android:style/Theme.NoTitleBar"
like image 131
Aelexe Avatar answered Sep 30 '22 20:09

Aelexe