Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.app.Activity;

import android.content.Intent;

public class Main {

    public static void gotoActivity(Activity curActivity, Class<?> targetActivity, boolean finish) {
        Intent intent = new Intent();
        intent.setClass(curActivity, targetActivity);
        curActivity.startActivity(intent);
        //      curActivity.overridePendingTransition(R.anim.slide_left_in,
        //            R.anim.slide_left_out);

        if (finish) {
            curActivity.finish();
        }
    }
}