I need some help on creating a native splashscreen.
I mean the splash that use the png in drawable path.
In AndroidManifest.xml we have:
android:icon="@drawable/icon"
and it works.
But the default theme:
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
Doesn’t have the style:
<item name="android:windowBackground">@drawable/splash</item>
So what is the right way to proceed?
I have created styles.xml in res/values, with the following code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Splash" parent="android:Theme">
<item name="android:windowBackground">@drawable/splash</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
</style>
</resources>
And then in AndroidManifest.xml, my activity is:
<activity
android:name="org.cocos2dx.cpp.AppActivity"
android:label="@string/app_name"
android:launchMode="singleTop"
android:screenOrientation="sensorPortrait"
android:configChanges="orientation"
android:theme="@style/Theme.Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
The splash works, but then the activity don’t go fullscreen, it seems like a quarter of screen with the splashscreen behind, really strange.
Please help me with the right procedure to achieve this, thank you, I really don’t know what’s wrong.