Android examples for Activity:Activity Start
start Activity From Class
//package com.java2s; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.support.annotation.NonNull; public class Main { public static boolean startActivityFromClass( @NonNull final Context context, @NonNull final Class<? extends Activity> cls) { final Intent i = new Intent(context, cls); context.startActivity(i);// ww w . j a va 2s . c om return true; } }