Skip to content

LaunchScreenActivity Layout

The exact layout of the welcome screen/launch screen depends on the launch screen type and on the setDemoAvailable setting as described above. In general, the welcome screen/launch screen may contain:

  • an app name (headline label/title),
  • an app feature list consisting of images, feature names and feature descriptions,
  • a primary button labeled as "Get Started",
  • a start demo button labeled as "Try the demo",
  • and a footnote with links to "Terms of Service and "Privacy Policy".

All the mentioned labels can be customized via the Settings configuration, that is you can overwrite them via the corresponding set methods of the LaunchScreenSettings class. The LaunchScreenSettings class can be instantiated with default constructor. The set methods should be called before calling the saveToIntent method, which saves the configuration into an Intent. Finally, this intent should be used when starting the WelcomeScreenActivity via the startActivityForResult method.

Customizing the Welcome Screen

You can use the LaunchScreenSettings object for customize the labels of the launch screen. The following options are available:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
    /**
     * Sets the type of the onboarding.
     *
     * @param welcomeScreenType selected onboarding, non-null
     */
    public void setWelcomeScreenType(OnboardingType welcomeScreenType) {
        if (welcomeScreenType == null) {
            throw new NullPointerException("welcome screen type cannot be null");
        }
        this.welcomeScreenType = welcomeScreenType;
    }

    /**
     * Enables or disables the demo mode.
     *
     * @param demoAvailable true to enable, false to disable the demo mode
     */
    public void setDemoAvailable(boolean demoAvailable) {
        this.demoAvailable = demoAvailable;
    }

    /**
     * Sets the app name to show on the Launch screen
     *
     * @param headlineText the app name
     */
    public void setLaunchScreenHeadline(String headlineText) {
        this.launchScreenHeadline = headlineText;
    }

    /**
     * Sets the primary action button label to use on the Launch screen.
     *
     * @param buttonLabel the primary action button label
     */
    public void setLaunchScreenPrimaryButton(String buttonLabel) {
        this.launchScreenPrimaryButton = buttonLabel;
    }

    /**
     * Sets the demo button label to use on the Launch screen.
     *
     * @param buttonLabel the demo button label
     */
    public void setLaunchScreenDemoButton(String buttonLabel) {
        this.launchScreenDemoButton = buttonLabel;
    }

It may be important:

  • On the top of the screen SAP Logo cannot be changed.

  • If you skip adjusting headline label text, it's empty.

Customizing the Welcome screen animation

The middle part of the welcome screen / launch screen represents the application features. It consists of a graphic element (this can be a feature relevant image), a feature title and a feature description. You can use these methods for customization:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
    /**
     * Sets the array of the feature related images' resources to use on the Launch screen.
     *
     * @param imageResources the array of the feature images' resources
     */
    public void setLaunchScreenImages(int[] imageResources) {
        this.launchScreenImages = imageResources;
    }

    /**
     * Sets the array of feature titles to use on the Launch screen.
     *
     * @param titles the array of feature titles
     */
    public void setLaunchScreenTitles(String[] titles) {
        this.launchScreenTitles = titles;
    }

    /**
     * Sets the array of the feature descriptions on the Launch screen
     *
     * @param descriptions the array of the feature descriptions
     */
    public void setLaunchScreenDescriptions(String[] descriptions) {
        this.launchScreenDescriptions = descriptions;
    }

    /**
     * Sets the interval number of the feature based content animation on the Launch screen.
     *
     * @param interval the interval of the feature based content
     */
    public void setLaunchScreenAnimationInterval(int interval) {
        this.launchScreenAnimationInterval = interval;
    }

There are some rules about its usage:

  • If you skip adjusting the animation interval, the default animation timing is 4 ms (=4000).

  • If you skip adjusting application feature presentation, the middle of the screen is a blank area.

  • You can give just one feature too. In this case, there are no animation.

  • The length of the feature image, title and description array must be the same. If you can show three features, all of the arrays which sets the feature part, must contain three element. Otherwise it causes error.

  • The launch screen image must be an Android resource id, for example a R.drawable.first_feature_image.

  • You can skip setting feature image, if you set the related array element to 0. In this case the feature image space is hidden.

  • If the feature description is longer than 6 lines, then we recommend removing the graphic element to fit more text in the textbox.

Customizing the Welcome screen footnote

Via the LaunchScreenSettings, the welcome screen/launch screen footnote links can be customized with the following setter methods:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
    /**
     * Sets the terms of service url on the Launch screen
     *
     * @param url the terms of service url
     */
    public void setLaunchScreenUrlTermsOfService(String url) {
        this.launchScreenUrlTermsOfService = url;
    }

    /**
     * Sets the privacy policy url on the Launch screen
     *
     * @param url the privacy policy url
     */
    public void setLaunchScreenUrlPrivacy(String url) {
        this.launchScreenUrlPrivacy = url;
    }

It may be important:

  • The text of the footnote ("View our Terms of Service & Privacy Policy") cannot be changed.

  • If you skip adjusting both of the footnote links, the footnote label is hidden.