Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AndroidManifest.xml
- <?xml version="1.0" encoding="utf-8"?>
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.caius.thebasics"
- android:versionCode="1"
- android:versionName="1.0" >
- <uses-sdk
- android:minSdkVersion="14"
- android:targetSdkVersion="17" />
- <application
- android:allowBackup="true"
- android:icon="@drawable/ic_launcher"
- android:label="@string/app_name"
- android:theme="@style/AppTheme" >
- <activity
- android:name="com.caius.thebasics.Menu"
- android:label="@string/app_name" >
- <intent-filter>
- <action android:name="com.caius.thebasics.MENU" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- </activity>
- <activity
- android:name="com.caius.thebasics.Main"
- android:label="@string/app_name" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
- </manifest>
- Main.java
- package com.caius.thebasics;
- import android.app.Activity;
- import android.content.Intent;
- import android.os.Bundle;
- import android.view.Menu;
- public class Main extends Activity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_splash);
- Thread logoTimer = new Thread(){
- public void run(){
- try{
- Thread.sleep(2000);
- Intent menuIntent = new Intent("com.caius.thebasics.MENU");
- startActivity(menuIntent);
- }
- catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- finally{
- finish();
- }
- }
- };
- logoTimer.start();
- }
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- // Inflate the menu; this adds items to the action bar if it is present.
- getMenuInflater().inflate(R.menu.main, menu);
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement