Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>1) If you just want to destroy the handler (handler must be class-global):</p> <pre><code>@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_BACK)) { Intent intent_basla = new Intent(PreAcilis.this, Acilis.class); startActivity(intent_basla); //delete callbacks } return super.onKeyDown(keyCode, event); } </code></pre> <p>2) But, if you are only using the activity as a "splash screen":</p> <pre><code>@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_BACK)) { Intent intent_basla = new Intent(PreAcilis.this, Acilis.class); startActivity(intent_basla); finish(); } return super.onKeyDown(keyCode, event); } </code></pre> <p>3) In my opinion, for just displaying a splash screen, use a screen-size layout with your views and display/hide it on <code>onCreate()</code> with a postDelayed. This way you can avoid weird navigation stacks by only handling 1 Activity class.</p> <p>EDIT:</p> <p>4) I'm using this on some of my apps and I'm not experiencing your problems. Launching this Activity, it shows a splash screen and 3 seconds later it fires the next Activity, nothing else:</p> <pre><code>public class PreAcilis extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { getWindow().requestFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.pre_acilis); super.onCreate(savedInstanceState); new Handler().postDelayed(new Runnable(){ public void run() { Intent i = new Intent(getApplicationContext(),Acilis.class); startActivity(i); finish(); } }, 3000); } } </code></pre>
    singulars
    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.
    1. This table or related slice is empty.
    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