go To Activity - Android android.app

Android examples for android.app:Activity Navigation

Description

go To Activity

Demo Code

import android.content.Context;
import android.content.Intent;

public class Main{

    public static void goToActivity(Context packageContext,
            Class<?> targetActivityClass) {
        Intent intent = new Intent();
        intent.setClass(packageContext, targetActivityClass);
        packageContext.startActivity(intent);
    }//from   w  w  w .  ja  v a  2 s .  com

}

Related Tutorials