enter Activity - Android android.app

Android examples for android.app:Activity Navigation

Description

enter Activity

Demo Code

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class Main{

    public static void enterActivity(Activity activity, Class clz) {
        Intent intent = new Intent(activity, clz);
        activity.startActivity(intent);/* w  w w.ja v a 2 s .c  om*/
    }
    public static void enterActivity(Activity activity, Intent intent) {
        activity.startActivity(intent);
    }
    public static void enterActivity(Activity activity, Intent intent,
            int requestCode) {
        activity.startActivityForResult(intent, requestCode);
    }

}

Related Tutorials