open Activity - Android Activity

Android examples for Activity:Activity Start

Description

open Activity

Demo Code


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

public class Main {
    public static void openActivity(Context context, Class newActivity) {
        Intent intent = new Intent(context, newActivity);
        context.startActivity(intent);//from  w ww.  j av  a2 s  .c o  m
        //        intent.putExtra(SimpleBackActivity.BUNDLE_KEY_PAGE, page.getValue());
    }
}

Related Tutorials