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

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

GitHub user AlexTalis opened a pull request:

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

    CB-8753 Maintain splash screen aspect ratio

    - Added "SplashMaintainAspectRatio” preference to maintain SplashScreen
    aspect ratio instead of scaling it to dialog.
    - Added “SplashReloadOnOrientationChange” preference to reload drawable
    when orientation changes. It's a preference for performance reasons - do
    not reload the drawable if it does not change based on orientation.

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

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

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

    https://github.com/apache/cordova-plugin-splashscreen/pull/43.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 #43
    
----
commit 9155b9066202716b13c72e4c5b20204eb8f20426
Author: Alex Talis <[email protected]>
Date:   2015-03-27T18:33:01Z

    CB-8753 Maintain splash screen aspect ratio
    
    - Added "SplashMaintainAspectRatio” preference to maintain SplashScreen
    aspect ratio instead of scaling it to dialog.
    - Added “SplashReloadOnOrientationChange” preference to reload drawable
    when orientation changes. It's a preference for performance reasons - do
    not reload the drawable if it does not change based on orientation.

----


> Maintain splash screen aspect ratio
> -----------------------------------
>
>                 Key: CB-8753
>                 URL: https://issues.apache.org/jira/browse/CB-8753
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Android
>    Affects Versions: 3.7.1
>         Environment: Android
>            Reporter: Alex Talis
>             Fix For: 3.8.0, 4.0.0, 3.7.1
>
>         Attachments: cur-land.png, cur-port.png, new-land.png, new-port.png
>
>
> I will be submitting a pull request for this enhancement shortly.
> Current splash screen scales images non-uniformly to fit into splash dialog. 
> This approach does not work well for many typical splash screen images that 
> contain scenery or text and look bad when aspect ratio is not preserved. 
> 9-patch images work, but they have to be carefully designed so that the edges 
> can be stretched without producing undesired effects.
> The purpose of this enhancement is to allow use of non-9-patch images without 
> stretching, similar to CSS "background-size:cover" capability. For this to 
> work, splash images have to have large safe area all around that can be 
> safely cropped off.
> With this type of splash screen, it is usually necessary to use different 
> images for portrait and landscape orientations, so a second part of this 
> enhancement is to add an option to reload the drawable when orientation 
> changes.
> Examples of the two preferences are shown below. Both are optional and 
> default to False to maintain current splash screen behavior.
> <preference name="SplashMaintainAspectRatio" value="true"/>
> <preference name="SplashReloadOnOrientationChange" value="true"/>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to