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

Steren Giannini commented on CB-3337:
-------------------------------------

Hi (I'm the author of the reverted patch),

I'm sorry, I did not tested with 9-patch. And should have before submitting my 
pull reuest.

The goal was to have by default decent splashscreens with regular images. 
Before 2.7, the default behavior was to stretch the input image. I think 
stretching is a very bad design choice. Very few image have been created to 
look nice after a scaling that is not the same on X and Y, especially 
splashscreens which have brand logos and texts.


I know that the 
[documentation](http://docs.phonegap.com/en/2.7.0/cordova_splashscreen_splashscreen.md.html#Splashscreen)
 is recommending to use 9-patches, but they require extra work and are not 
obvious to people who never heard of them.

I would also add that if the splashscreen contains a centered logo on a 
textured background, it is very hard to create a clean 9-patch, the texture 
will lose its regularity, being more stretched on some parts of the image than 
other.

I would propose the following beahavior: Never stretch the splashscreen (use a 
"background-cover" strategy with ScaleType.CENTER_CROP), unless the image is 
specifically a 9-patch (and thus has been designed to stretch non-uniformly).

Additionally, this would be more consistent with other platforms such as iOS 
where, the splashscreen is a regular image of specific dimensions, easy to 
understand for users.
                
> Splashscreen zoomed in android on cordova 2.7
> ---------------------------------------------
>
>                 Key: CB-3337
>                 URL: https://issues.apache.org/jira/browse/CB-3337
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.7.0
>         Environment: Cordova 2.7 (upgraded from 2.5), Android 2.2 - 4.1.2
>            Reporter: Frederico Costa Galvão
>            Assignee: Joe Bowser
>              Labels: android, splashscreen
>         Attachments: bacon.zip
>
>
> I've been using a 9patch splashscreen image since cordova 1.9, and it's been 
> working until now (cordova 2.5).
> After upgrading to 2.7, any image I try to set as splashscreen appears to be 
> zoomed at least 2x, maybe more.
> I've tried with different 9patches, simple images, specific dpi images, and 
> even a bitmap xml descriptor which is accepted by android. None of them 
> worked, all with the same problem.
> As I follow closely cordova commits and changelogs, all I know is that it's 
> related to this commit: 
> https://github.com/apache/cordova-android/commit/ba314246047501c36916604facb5e097572771e4
> I haven't found any discussion that leads to that commit, so I can't say 
> anything as to why this change was made.
> An example is attached. Just change cordova*.js/jar from 2.7 to 2.5(or 2.6) 
> to see the difference.
> As a side note, I realized that simply specifying the 'splashscreen' 
> preference in config.xml was not enough, and I had to put the code on the 
> java class too to make it even recognize the splash setting. However, this is 
> not an 2.7 issue, as I have seen it before on 2.5.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to