title: Creating a splash screen that does not take extra time for the app to start
body: <p>I have this splash screen:</p>
  
  <p><img src="https://i.stack.imgur.com/NQxMX.png" alt="enter image description here"></p>
  
  <p>The problem with it is that it gets an extra time for the app to start which is something I do not really want. I found that there is a way of changing the default white splash screen that shows when you start any app using <code>android:windowBackground</code>. At the moment I am doing it with <code>layer-list</code> but I am facing quite big problems converting <code>LinearLayout</code> to <code>layer-list</code>. Any idea how to make this code?</p>
  
  <p><strong>Current splash screen code:</strong></p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@drawable/gradient_background"
  android:orientation="vertical"
  android:weightSum="100"
  tools:context="com.example.kristiqngergov.healthapp.SplashActivity"&gt;
  
  &lt;LinearLayout
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_weight="23"&gt;
  &lt;/LinearLayout&gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:layout_weight="34"
      android:gravity="center|bottom"&gt;
  
      &lt;ImageView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/splash_logo"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent"
          app:layout_constraintVertical_bias="0.286" /&gt;
  &lt;/LinearLayout&gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:layout_weight="43"
      android:gravity="center"
      android:orientation="vertical"&gt;
          &lt;TextView
              android:id="@+id/app"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_centerVertical="true"
              android:layout_gravity="center"
              android:layout_marginBottom="10dp"
              android:fontFamily="sans-serif-black"
              android:lineSpacingExtra="9sp"
              android:textColor="#fff"
              android:textSize="53sp"
              android:textStyle="normal"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintStart_toStartOf="parent"
              tools:layout_editor_absoluteY="448dp"
              tools:text="Dr.Oh" /&gt;
  
          &lt;TextView
              android:id="@+id/wait"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textSize="12sp"
              android:fontFamily="sans-serif"
              android:textStyle="normal"
              android:textColor="#fff"
              android:layout_centerVertical="true"
              tools:text="Моля изчакайте..." /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>The splash code I want:</strong></p>
  
  <pre><code>   &lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt;
        &lt;item android:drawable="@drawable/gradient_background" /&gt;
        &lt;item&gt;
           &lt;bitmap android:src="@drawable/splash_logo" /&gt;
        &lt;/item&gt;
   &lt;/layer-list&gt;
  </code></pre>
  
  <p>The problem with the layer list is that I can not really set the weight of every item which is a big problem since the image is way too big and it fit the whole screen. </p>
  
  <p>Layer-list splash screen:</p>
  
  <p><img src="https://i.stack.imgur.com/WSR34.png" alt="enter image description here"></p>