Last active
December 16, 2015 20:29
-
-
Save surfjedi/5493327 to your computer and use it in GitHub Desktop.
Phone Gap 2.6.0 android [your_app_name].java. With:
1.timed splash screen
2. hidden status bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.[your_company_name].[your_app_name]; | |
import android.os.Bundle; | |
import org.apache.cordova.*; | |
import android.view.WindowManager; | |
public class [your_app_name] extends DroidGap | |
{ | |
@Override | |
public void onCreate(Bundle savedInstanceState) | |
{ | |
super.onCreate(savedInstanceState); | |
super.setIntegerProperty("splashscreen", R.drawable.splash); | |
// Set by <content src="index.html" /> in config.xml | |
super.loadUrl(Config.getStartUrl(), 5000); | |
//super.loadUrl("file:///android_asset/www/index.html") | |
//Full screen | |
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, | |
WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also you need to have:
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
in your application Minfest file in the activity section.