Google+ ZACARÉS: March 2016

Translate

2016/03/22

Embarcadero RAD Studio 10 Seattle Android Native Splash Screen

Quick Notes

  • Prepare your splash image and name as splash.png (760x1024).
  • Build the project, target Android to obtain AndroidManifest.template.xml
  • Modify generated AndroidManifest.template.xml, change the highlighted line
    <application android:persistent="%persistent%"
        android:restoreAnyVersion="%restoreAnyVersion%"
        android:label="%label%"
        android:debuggable="%debuggable%"
        android:largeHeap="%largeHeap%"
        android:icon="%icon%"
        android:theme="%theme%"        android:hardwareAccelerated="%hardwareAccelerated%">
     <application android:persistent="%persistent%"
        android:restoreAnyVersion="%restoreAnyVersion%"
        android:label="%label%"
        android:debuggable="%debuggable%"
        android:largeHeap="%largeHeap%"
        android:icon="%icon%"
        android:theme="@style/MyTheme.NoTitleBar.CustomBackground"        android:hardwareAccelerated="%hardwareAccelerated%">
  • Create styles.xml with the following content
<resources>
<style name="MyTheme.NoTitleBar.CustomBackground" parent="@android:Theme.Black">
  <item name="android:windowBackground">@drawable/splash</item>
  <item name="android:windowNoTitle">true</item>
  <item name="android:windowFullscreen">false</item>
  <item name="android:windowContentOverlay">@null</item>
</style>
</resources>
  •  Deployment property
    • styles.xml --> res/values/styles.xml
    • splash.png --> res/drawable-port/splash.png