Keep Android Splashscreen image aspect ratio instead of stretching it. #43

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@steren
steren commented Apr 2, 2013

Because Android device screens are all different, we cannot consider that one splashscreen dimension will fit them all. Currently, the code stretches it, and the image can lose its aspect ratio, which is bad for logo or other graphical designs.

An ImageView is used to be able to use ScaleType.CENTER_CROP, which is similar to the background-size:cover CSS property

@steren steren Keep the splashscreen image ratio instead of streatching it.
An ImageView is used to be able to use ScaleType.CENTER_CROP, which is similar to the background-size:cover CSS property
333a0c3
@agrieve
agrieve commented Apr 4, 2013

Thanks Steren! I've merged in your change:

https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;a=commit;h=ba314246047501c36916604facb5e097572771e4

And updated the relevant bug: https://issues.apache.org/jira/browse/CB-1367

Please close the pull request.

@steren
steren commented Apr 4, 2013

Thanks for the merge.
I should have searched the bug tracker because the technical solution was given in the description. Instead I investigated for some time before finding the way to solve the problem (using the imageView) :)

@steren steren closed this Apr 4, 2013
@agrieve
agrieve commented May 4, 2013

This change just got reverted because it broke apps that use 9-patch images for splash screens. If you think there is still merit in this approach, please chime in on https://issues.apache.org/jira/browse/CB-3337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment