首页 > 代码库 > 启动activity传递参数的另外一种工具类

启动activity传递参数的另外一种工具类

public class IntentUtil {
	public static void start_activity(Activity activity,Class<?> cls,<span style="color:#ff6666;">BasicNameValuePair</span>...name)
	{
		Intent intent=new Intent();
		intent.setClass(activity,cls);
		for(int i=0;i<name.length;i++)
		{
			intent.putExtra(name[i].getName(), name[i].getValue());
		}
		activity.startActivity(intent);
		activity.overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
	}
}

启动activity传递参数的另外一种工具类