Example usage for android.app Activity startActivity

List of usage examples for android.app Activity startActivity

Introduction

In this page you can find the example usage for android.app Activity startActivity.

Prototype

@Override
public void startActivity(Intent intent) 

Source Link

Document

Same as #startActivity(Intent,Bundle) with no options specified.

Usage

From source file:Main.java

public static void enterActivity(Activity activity, Class clz) {
    Intent intent = new Intent(activity, clz);
    activity.startActivity(intent);
}

From source file:Main.java

@SuppressWarnings("rawtypes")
public static void startOneActivity(Activity mActivity, Class cls) {
    Intent intent = new Intent(mActivity, cls);
    mActivity.startActivity(intent);
    mActivity.finish();//from  w w  w  .  j  a v  a  2  s  .  co  m
}

From source file:Main.java

public static void startActivity(Activity context, Class<?> cls) {
    Intent intent = new Intent(context, cls);
    context.startActivity(intent);
}

From source file:Main.java

public static void startSetActivity(Activity activity) {
    Intent intent = new Intent(Settings.ACTION_SETTINGS);
    activity.startActivity(intent);
}

From source file:Main.java

public static void startActivityAndFinish(Activity context, Class<?> cls) {
    Intent intent = new Intent(context, cls);
    context.startActivity(intent);
    context.finish();/*from ww w  .ja v a  2  s.  c  om*/
}

From source file:Main.java

public static void openSetting(Activity activity) {
    Intent intent = new Intent(Settings.ACTION_WIFI_SETTINGS);
    activity.startActivity(intent);
}

From source file:com.ps.sleek.activity.AppsActivity.java

public static void start(Activity activity) {
    activity.startActivity(new Intent(activity, AppsActivity.class));
    activity.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}

From source file:Main.java

public static void startActivity(Activity activity, Class<?> cls) {
    Intent intent = new Intent(activity, cls);
    activity.startActivity(intent);
}

From source file:Main.java

public static void restartActivity(Activity activity) {
    Intent intent = activity.getIntent();
    activity.finish();/*from  w  w w . j a v a  2s.c  o  m*/
    activity.startActivity(intent);
}

From source file:Main.java

/**
 * Start the original activity, and finish the precondition activity.
 * // ww w . j a v  a 2  s.  co m
 * @param preconditionActivity
 */
public static void startOriginalActivityAndFinish(Activity preconditionActivity) {
    preconditionActivity.finish();
    preconditionActivity
            .startActivity((Intent) preconditionActivity.getIntent().getParcelableExtra(EXTRA_WRAPPED_INTENT));
}