In order to display it well on mobile phones, the aspect ratios of mobile phones with different screen sizes are different, so our basic idea is to enlarge the picture based on the width. The mobile phone can be easily configured through the centerCrop attribute in the scaleType in the ImageView
Layout code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
>
<ImageView
android:scaleType="centerCrop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/launcher_bg"
/>
</LinearLayout>