Using java Syntax Highlighting
- package ex.splash;
- import android.app.Activity;
- import android.content.Intent;
- import android.os.Bundle;
- import android.os.Handler;
- public class Splashscreen extends Activity {
- private final int SPLASH_DISPLAY_LENGHT = 3000;
- @Override
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- setContentView(R.layout.main);
- new Handler().postDelayed(new Runnable(){
- @Override
- public void run() {
- Intent mainIntent = new Intent(Splashscreen.this,Splashscreen.class);
- Splashscreen.this.startActivity(mainIntent);
- Splashscreen.this.finish();
- }
- }, SPLASH_DISPLAY_LENGHT);
- }
- }
Parsed in 0.033 seconds, using GeSHi 1.0.8.4
Using xml Syntax Highlighting
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="fill_parent"
- android:layout_height="fill_parent">
- <ImageView android:layout_width="fill_parent"
- android:layout_height="fill_parent" android:scaleType="fitCenter"
- android:src="@drawable/truska" />
- </LinearLayout>
Parsed in 0.002 seconds, using GeSHi 1.0.8.4
With this code, the app keeps popping up from the home screen of the emulator. Is it normal?




) the splashscreen doesn't appear but my mainactivty does.