Java tutorial
//package com.java2s; //License from project: Apache License import android.app.Activity; import android.content.Intent; public class Main { public static void startActivity(Activity activity, Class classActivity) { Intent intent = new Intent(); intent.setClass(activity, classActivity); activity.startActivity(intent); } public static void startActivity(Intent intent, Activity activity, Class classActivity) { intent.setClass(activity, classActivity); activity.startActivity(intent); } }