You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/10/18 07:28:00 UTC

[jira] [Commented] (CB-13460) Apply Android style to the splash screen.

    [ https://issues.apache.org/jira/browse/CB-13460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16208926#comment-16208926 ] 

ASF GitHub Bot commented on CB-13460:
-------------------------------------

GitHub user pdyraga opened a pull request:

    https://github.com/apache/cordova-plugin-splashscreen/pull/137

    CB-13460: Apply Android style to the splash screen

    This change makes the splash screen dialog use the `SplashScreenStyle`, if defined.
    If not, it falls back to the default style.
    
    Using Android style is a way more robust than adding configurable status/navigation color properties.
    
    Examples:
    In the `config.xml`:
    ```
    <resource-file src="my-android-theme.xml" target="res/values/themes.xml" />
    ```
    
    In the `my-android-theme.xml`:
    ```
    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        <style name="SplashScreenStyle">
            <item name="android:windowFullscreen">true</item>
            <item name="android:windowTranslucentNavigation">true</item>
        </style>
    </resources>
    ```
    
    ![image](https://user-images.githubusercontent.com/4712360/31705508-f67debcc-b3e5-11e7-980c-78cf34c0ca76.png)
    ```
    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        <style name="SplashScreenStyle">
            <item name="android:statusBarColor">@android:color/holo_green_light</item>
            <item name="android:navigationBarColor">@android:color/holo_green_light</item>    
        </style>
    </resources>
    ```
    
    ![image](https://user-images.githubusercontent.com/4712360/31705544-1b3f50fe-b3e6-11e7-9440-2cf7cd003fdb.png)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/pdyraga/cordova-plugin-splashscreen master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-splashscreen/pull/137.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #137
    
----
commit 143b63eda15f11a3de1a198dc63f84e09ed2e4e8
Author: Piotr Dyraga <pi...@ontheserverside.com>
Date:   2017-10-18T06:40:33Z

    Apply an Android Style to the splash screen
    
    Cordova 6.4.0 adds `edit-config` support to `config.xml`. This lets to easily define custom Android styles.
    This change makes the splash screen dialog use the `SplashScreenStyle`, if defined.
    If not, it falls back to the default style.

----


> Apply Android style to the splash screen.
> -----------------------------------------
>
>                 Key: CB-13460
>                 URL: https://issues.apache.org/jira/browse/CB-13460
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-plugin-splashscreen
>            Reporter: Piotr Dyraga
>
> This improvement aims at making the splash screen dialog use the `SplashScreenStyle`, if defined. If not, it plugin should fall back to the default style (backward compatibility).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org