<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.wi_fi_canic" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".WelcomeActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".Login" > </activity> </application> </manifest>
package com.example.wi_fi_canic; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.os.Handler; public class WelcomeActivity extends Activity { final int display = 3000; //private int count = 0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_welcome); new Handler().postDelayed(new Runnable(){ @Override public void run() { Intent i = new Intent(WelcomeActivity.this,Login.class); WelcomeActivity.this.startActivity(i); WelcomeActivity.this.finish(); } }, display); } /*@Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.activity_welcome, menu); return true; }*/ }
import android.app.Activity; import android.os.Bundle; public class Login extends Activity{ /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.login); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)