Skip to content

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

Closed
steren wants to merge 1 commit intoapache:masterfrom
joshfire:master
Closed

Keep Android Splashscreen image aspect ratio instead of stretching it.#43
steren wants to merge 1 commit intoapache:masterfrom
joshfire:master

Conversation

@steren
Copy link
Copy Markdown
Contributor

@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

An ImageView is used to be able to use ScaleType.CENTER_CROP, which is similar to the background-size:cover CSS property
@agrieve
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Contributor Author

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
Copy link
Copy Markdown
Contributor

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants