Dismiss Notice

REGISTRATION IS AFTER ADMIN ACTIVATION

DONATIONS WITH PAYPAL CLICK TO BUTTON

1 MONTH VIP - 5$; 3 MONTHS VIP - 10$; 6 MONTHS VIP - 20$; 1 YEAR VIP - 30$; 2 YEARS VIP - 50$; GOLD USER FOR LIFE VIP - 150$

DONATIONS WITH Bitcoin Address:3NRs3CK3fhXifrNYxHEZKpETDd9vNLMsMD

Dismiss Notice
The registration is approved by the Administrator. It takes about 1 day to approve your registration
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 N0body, Feb 19, 2014.

  1. N0body
    Online

    N0bodyN0body is a Verified Member DelphiFan Administrator 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

Laws
Our website, law, laws, copyright and aims to be respectful of individual rights. Our site, as defined in the law of 5651 serves as a provider of space. According to the law, contrary to the law of site management has no obligation to monitor content. Therefore, our site has adopted the principle of fit and remove. Works are subject to copyright laws and is shared in a manner that violated their legal rights, or professional associations, rights holders who, adsdelphi@gmail.com I can reach us at e-mail address. Complaints considered to be infringing on the examination of the content will be removed from our site.
Donate Help To Us and Be VIP
DONATIONS WITH PAYPAL CLICK TO BUTTON
6 MONTHS VIP - 20$; 1 YEAR VIP - 30$; 2 YEARS VIP - 50$; GOLD USER FOR LIFE VIP - 150$
Social Block