skip to Main Content

I am trying to implement a splash screen for my application, following the usual method; defining a new theme inside the styles XML file that places a drawable as windowBackground and reverting to the main theme in the Activity’s onCreate().

However, I am having problems when showing the logo I developed in Photoshop: I exported it as a 144×144 PNG file, created an Image Asset with it (replacing the standard ic_launcher drawable) but when I try to visualize it inside an XML file, this image is displayed instead

Screenshot

Any ideas? I’ve also tried to create a vector asset from the .psd but nothing is shown either…

2

Answers


  1. https://romannurik.github.io/AndroidAssetStudio/

    use this link to generate your icon. It will work.

    Login or Signup to reply.
  2. Change the code and so on

    <?xml version="1.0" encoding="utf-8"?>
    <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    
        <item android:drawable="@color/your_background"/>
        <item android:drawable="@drawable/your_image">
        </item>
    </layer-list>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search