run Activity - Android Activity

Android examples for Activity:Activity Start

Description

run Activity

Demo Code


//package com.java2s;
import android.app.Activity;
import android.view.Window;
import android.view.WindowManager;

public class Main {
    public static void runActivity(Activity activity, int activityId) {
        activity.requestWindowFeature(Window.FEATURE_NO_TITLE);
        activity.getWindow().setFlags(/*from   w  w w . ja  va  2s  .  co  m*/
                WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        activity.setContentView(activityId);

    }
}

Related Tutorials