go To Activity by Activity subclass Class - Android android.app

Android examples for android.app:Activity Navigation

Description

go To Activity by Activity subclass Class

Demo Code

import android.app.Activity;
import android.content.Context;
import android.content.Intent;

public class Main{

    public static void goToActivity(Context currentActivity,
            Class<? extends Activity> newClass) {

        Intent newActivity = new Intent(currentActivity, newClass);
        currentActivity.startActivity(newActivity);
    }/*from   ww w.  j ava 2s .com*/

}

Related Tutorials