I am making an app in Android Studio and I have just started making the splash screen. However, I have been having trouble making the image show up as the right size/quality in the android:background
property.
Here is the XML code that I am using to display the drawable:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:background="@drawable/main_logo"
android:keepScreenOn="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:context=".Splash">
</RelativeLayout>
The drawable is displayed, but it is a small image in the top left corner of the screen. The original image is 2500 x 2500 pixels at 9999.99 pixels/inch resolution, so it would have no trouble resizing.
How would I specify to use a different size like xxhdpi
instead of hdpi
which has been resized, or use the original image and resize it in the center of the screen?