I am developing an android app using phonegap (cordova-2.1.0).

My MainActivity.java code is as following -

package com.app.myapp;

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

public class MainActivity extends DroidGap {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.loadUrl("file:///android_asset/www/index.html");
    }
}

Problem : Whenever I start the application, it shows MainActivity window first and then show the actual HTML code. Is there any way to get rid of MainActivity and show the HTML directly?

Thanks in Advance...

有帮助吗?

解决方案

Add this to your AndroidManifest application tag:

android:theme="@android:style/Theme.NoTitleBar"

Should do the trick.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top