1

I have a image which is quite big for Splash Screen. I want to reduce the size of this image but unable to do so. I have read already answers to this question which are here on SO but none of those answers helped. Please help.

launch_background.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="?android:colorBackground" />

    <!-- You can insert your own image assets here -->
    <item>
        <bitmap
            android:gravity="center"
            android:src="@drawable/bluetoothicon"
            android:width="100dp"
        android:height="100dp" />
    </item>
</layer-list>

Splash Screen

Splash Screen

Bluetooth Image

bluetooth-image

4
  • Did you tried changes of height and width` in the above xml? Commented Feb 22, 2022 at 6:13
  • Yes, you can see it in the code itself. Commented Feb 22, 2022 at 6:15
  • Attach ss of your splash screen and bluetoothicon so i can try. Commented Feb 22, 2022 at 6:23
  • @DholaHardik Updated Post. Please check. Commented Feb 22, 2022 at 6:29

1 Answer 1

2

Try this code.

<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="?android:colorBackground" />

    <item
        android:width="200dp"
        android:height="200dp"
        android:gravity="center">
        <bitmap android:src="@drawable/bluetoothicon" />
    </item>

</layer-list>

Output splash

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.