Note that there are some explanatory texts on larger screens.

plurals
  1. POSplash screen won't display before main actvity
    primarykey
    data
    text
    <p>i'm developing an android app but can't seem to get the splash screen to start before the main activity yet on all my other app's this has been no problem</p> <p>What could be the problem here? There's no problem in the code.</p> <pre><code>package com.example.soundboardapp; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Window; public class splash extends Activity { private long ms = 0; private long splashTime = 2000; private boolean splashActive = true; private boolean paused = false; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.splash); Thread mythread = new Thread() { public void run() { try { while (splashActive &amp;&amp; ms &lt; splashTime) { if (!paused) ms = ms + 100; sleep(100); } } catch (Exception e) { } finally { Intent intent = new Intent(splash.this, MainActivity.class); finish(); startActivity(intent); } } }; mythread.start(); } } </code></pre> <p>Theres a splash activity to correspond to the code. </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/intro22" &gt; &lt;LinearLayout android:id="@+id/linearLayout1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="center" &gt; &lt;/LinearLayout&gt; &lt;ProgressBar android:id="@+id/progressBar1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:layout_marginBottom="184dp" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>What could be the problem?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload