Android Activity Start startActivity(Context context, Class activity)

Here you can find the source of startActivity(Context context, Class activity)

Description

start Activity

Declaration

public static void startActivity(Context context, Class<?> activity) 

Method Source Code

//package com.java2s;
import android.content.Context;
import android.content.Intent;

public class Main {
    public static void startActivity(Context context, Class<?> activity) {
        Intent intent = new Intent(context, activity);
        context.startActivity(intent);//  w w  w  . ja  v  a  2 s  .  c o m
    }
}

Related

  1. goToActivity(Context currentActivity, Class newClass, List extras)
  2. openActivity(Context packageContext, int flags, Map pairs, boolean closeCurrentContext, Class activity)
  3. startApkActivity(final Context ctx, String packageName)
  4. restartActivity(final Activity activity)
  5. restartPC(final Activity activity)
  6. startNewActivity(Class target, final Activity activity)
  7. prepare(Activity activity, int id, int width)