1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Donation with Paypal!!!

    Go to your paypal account and send directly donation to [email protected]

    1 month - 10 $ - Standart VIP

    6 months - 20 $- Standart VIP

    1 year - 30 $- Standart VIP

    2 years - 50 $- Standart VIP

    Gold member for life - 150 $- Standart VIP

    High Vip (Standart VIP include) group please send PM or email to [email protected] for info

    After Donation please send email to [email protected]

  3. Donation Ways 2020


    Paysend
  4. Telegram
Dismiss Notice

Donation with Paypal!!!

Go to your paypal account and send directly donation to [email protected]

1 month - 10 $ - Standart VIP

6 months - 20 $- Standart VIP

1 year - 30 $- Standart VIP

2 years - 50 $- Standart VIP

Gold member for life - 150 $- Standart VIP

High Vip (Standart VIP include) group please send PM or email to [email protected] for info

After Donation please send email to [email protected]

Dismiss Notice
For open hidden message no need write thanks, thank etc. Enough is click to like button on right side of thread.

Add A Splash Screen With The Android Delphi XE5

Discussion in 'Delphi Android And IOS' started by AdminDF, Feb 19, 2014.

  1. AdminDF
    Online

    AdminDFAdminDF is a Verified Member Delphifan Staff Member DF Staff

    [​IMG]

    The idea of the splash screen is to have something for the user to look at instead of a black screen while the rest of the app is loading. The general implementation is that you create a styles.xml file which sets up a background image as a style and then you assign that to the theme part of the Android manifest. You must include the styles.xml file and the splash screen image in your project when deploying, make the small change to the Android manifest, and that is all there is to it. The change to the Android manifest looks like this:

    Code:
    android: theme = “@ style / MyTheme.NoTitleBar.SplashWindow”>

    And the contents of the styles.xml file looks like this:

    Code:
    <resources>
    <style name=”MyTheme.NoTitleBar.SplashWindow” parent=”@android:Theme.Holo”>
    <item name=”android:windowBackground”>@drawable/splash</item>
    <item name=”android:windowNoTitle”>true</item>
    <item name=”android:windowFullscreen”>true</item>
    </style> <font face=”Arial”><span style=”white-space: normal;”>
    </span></font> </resources>
    You can also click through directly to a sample app with source code on Github.
     
  2. jlnickle
    Offline

    jlnickle DF Member

    Thank you for this tip. For Beginners you need to go to project->Deployment. You then add the selected files in the deployment window, I don't think it matters where the files are locally. Under the "Remote path" column you update the image file to "\res\drawable\" and the style file updates to "\res\values\" You probably wanna do this under "All configurations-Android"

    Note: the xml posted in the tip has errors in it due to some html formatting being inserted. Also, it seems to override the main app's form to be "fullscreen" also if it wasn't normally. Not sure of the workaround for that yet.
     

    Attached Files:

Share This Page