Created
August 8, 2017 11:25
-
-
Save localdevm/620dc12c2568293c9f94bf810e678a5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//MainActivity | |
package com.example.maarten.labo35; | |
import android.content.Intent; | |
import android.os.Handler; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.Menu; | |
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
final int splashDelay = 1000; | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.layout); | |
new Handler().postDelayed(new Runnable() { | |
@Override | |
public void run() { | |
Intent mainintent = new Intent(MainActivity.this,Menu.class); | |
MainActivity.this.startActivity(mainintent); | |
MainActivity.this.finish(); | |
} | |
}, splashDelay); | |
} | |
} | |
//Menu.java | |
package com.example.maarten.labo35; | |
import android.app.Activity; | |
import android.support.v7.app.AppCompatActivity; | |
/** | |
* Created by maarten on 8/08/2017. | |
*/ | |
public class Menu extends AppCompatActivity { | |
} | |
//Manifest | |
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.maarten.labo35"> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:roundIcon="@mipmap/ic_launcher_round" | |
android:supportsRtl="true" | |
android:theme="@style/AppTheme"> | |
<activity android:name=".MainActivity"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
</activity> | |
<activity android:name=".Menu" /> | |
</application> | |
</manifest> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment