Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The launch screen is stretched on some devices #40

Open
helloagain-dev opened this issue Oct 11, 2018 · 0 comments
Open

The launch screen is stretched on some devices #40

helloagain-dev opened this issue Oct 11, 2018 · 0 comments

Comments

@helloagain-dev
Copy link

The current implementation of the launch screen layout stretches the image to fit the screen. As there are more and more devices that do not fit the pregenerated images it looks distorted on some of them.

A phone that is affected is the Huawei P20 Lite (https://www.gsmarena.com/huawei_p20_lite-9098.php) which has a screen resolution of 1080 x 2280px.

A launch screen layout that keeps the aspect ratio would fix this issue.

This is an example of launch_screen.xml that would fix this issue and has been tested by us for a while now:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ImageView android:layout_width="match_parent"
               android:layout_height="match_parent"
               android:src="@drawable/splash"
               android:scaleType="centerCrop"
    />
</LinearLayout>
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

No branches or pull requests

1 participant