Android Activity Start startNewActivity(Class target, final Activity activity)

Here you can find the source of startNewActivity(Class target, final Activity activity)

Description

start New Activity

Declaration

public static <T> void startNewActivity(Class<T> target,
            final Activity activity) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static <T> void startNewActivity(Class<T> target,
            final Activity activity) {
        Intent intent = new Intent(activity, target);
        activity.startActivity(intent);/*w w  w. j a v a  2 s . c om*/
    }
}

Related

  1. openActivity(Context packageContext, int flags, Map pairs, boolean closeCurrentContext, Class activity)
  2. startApkActivity(final Context ctx, String packageName)
  3. restartActivity(final Activity activity)
  4. restartPC(final Activity activity)
  5. startActivity(Context context, Class activity)
  6. prepare(Activity activity, int id, int width)